Bug 13312 - VS addin has incorrect TargetFrameworkVersion for MonoTouch framework
Summary: VS addin has incorrect TargetFrameworkVersion for MonoTouch framework
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 1.0.x
Hardware: PC Mac OS
: High normal
Target Milestone: 1.8.x (VS2013)
Assignee: Jose Miguel Torres
URL:
Depends on:
Blocks:
 
Reported: 2013-07-17 16:41 UTC by Mikayla Hutchinson [MSFT]
Modified: 2013-11-28 09:44 UTC (History)
9 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Mikayla Hutchinson [MSFT] 2013-07-17 16:41:11 UTC
The MonoTouch TargetFrameworkVersion is v1.0, as it has been since the beginning in MD/XS and MonoTouch itself.

See e.g.

/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoTouch/v1.0/RedistList/FrameworkList.xml
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Xamarin.ObjcBinding.CSharp.targets
Comment 1 Marek Habersack 2013-07-17 19:57:15 UTC
If we change it to v1.0 then VS won't allow the use of .NET 4.0+ APIs IIRC. There was also some other issue I don't remember right now. Jose, do you remember what it was? I think you were involved in this.
Comment 2 Jose Miguel Torres 2013-07-18 03:55:04 UTC
As far as I know it was some issue regarding to the project references but can't find further information. I will try to change to v1.0 locally and I will let you know.
Comment 3 Mikayla Hutchinson [MSFT] 2013-08-26 19:14:32 UTC
Please prioritize this, nuget has started baking your incorrect framework moniker into nuget packages.
Comment 4 Dominique Louis 2013-10-13 21:18:10 UTC
Jose is it possible to confirm if this is still an issue?
Comment 5 Jose Miguel Torres 2013-10-14 08:06:54 UTC
I have modified the commons target files to v1.0 instead of v4.0, and rename the PROGRAFM_FILESx86\Reference Assemblies\Framework\Microsoft\Moonotouch\v4.0 to v1.0  and everything looks right. I have been able to create and open a new iOS project and however I am NOT able to add a reference, VS displays:

"MyAssembly.dll", or one of its dependencies, requires a later version of the .NET Framework than the one specified in the project. You can change the .NET Framework target by clicking Properties on the Project menu and then selecting a new target in the '.NET Framework' dropdown box. (In Visual BVasic, this is located on the Compile tab by clicking the "Advanced Compiler Options..." button.) Do you still want to add a reference to 'MyAssembly.dll' in the project ?

I am still investigating on Frameworklist.xml and related topics, however if you guys have any clue, let me know.
Comment 6 Jose Miguel Torres 2013-10-14 09:52:04 UTC
The problem is that Xamarin.iOS profiling assemblies (Mono.Security.dll, MonoTouch.Dialog-1.dll, etc.) states that the Runtime Version (Version of the runtime these assemblies were compiled against) is v2.0.50727. Hence, if we set TargetFramework as v1.0 then the message pointed out in comment #5 will be triggered for each assembly. 

The same for Android. 

Maybe Clarius guys could throw us a clue over it.
Comment 7 PJ 2013-10-29 10:14:00 UTC
What I've heard about Nuget for PCL is that we know there are issues and we can't do anything about them. 

Does this fall into that category or is this something that will be irrevocable once released?

I can't really move this to 2.0 until we assess whether or not we hurt ourselves in the future by releasing without this fixed,
Comment 8 Mikayla Hutchinson [MSFT] 2013-10-29 14:42:50 UTC
PJ, this has nothing to do with PCL.
Comment 9 Alan McGovern 2013-10-31 12:13:13 UTC
We now use the right moniker.
Comment 10 Prashant manu 2013-11-28 09:44:21 UTC
I have checked this issue with following builds:

All Windows
MTVS 1.10.12

Now we are seeing v1.0 instead of v4.0. This is the screencast for the same: http://screencast.com/t/MLqBg0vZB

Changing the status to Verified