Bug 25300 - [Build][TargetFrameworkVersion] The wrong framework is being used for the assumed(?) default
Summary: [Build][TargetFrameworkVersion] The wrong framework is being used for the ass...
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: MSBuild ()
Version: Master
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: 1.12.0
Assignee: Chris Hamons
Depends on:
Reported: 2014-12-11 15:44 UTC by Stephen Shaw
Modified: 2015-01-14 04:46 UTC (History)
4 users (show)

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 or GitHub 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:

Description Stephen Shaw 2014-12-11 15:44:24 UTC
If you select unsupported framework in the Mac applications project settings and pick "Mono / .NET 4.5" it removes the <TargetFrameworkVersion> tag in the csproj. The idea is that 4.5 is the assumed default framework, however it uses 4.0 instead.

To test this:
1. create a mac app
2. change to unsupported framework (Mono/.NET4.5)
3. add code that was added to the 4.5 framework (not in 4.0)... async/await? or System.Collections.Generic.IReadOnlyList or something else 
4. try to build
5. ...
6. ...
7. profit?
Comment 1 Chris Hamons 2014-12-22 14:38:33 UTC
This is because we're still trying to build against 4.0 for some unknown reason:

Comment 3 Chris Hamons 2015-01-07 12:08:16 UTC
We're going to land this hack and then push a version of this bug to XS (either the addin or core) to figure out why TargetFrameworkVersion is wrong.
Comment 8 Chris Hamons 2015-01-13 15:12:08 UTC
Well not resolved yet, I gave me a local build.
Comment 9 Chris Hamons 2015-01-13 16:26:17 UTC
Should be in latest master now:

chamons pushed to branch master of xamarin/maccore
- Fix handling of unified full profile by setting unset Tar... (59261c8)

1.12 branch building now as well.