Bug 41519 - XBuild fails with TargetFrameworkVersion 4.6
Summary: XBuild fails with TargetFrameworkVersion 4.6
Status: RESOLVED FIXED
Alias: None
Product: Tools
Classification: Mono
Component: xbuild ()
Version: 4.2.0 (C6)
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-06-05 17:12 UTC by Marcos Jr.
Modified: 2016-06-06 20:42 UTC (History)
2 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 GitHub or 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:
RESOLVED FIXED

Description Marcos Jr. 2016-06-05 17:12:16 UTC
Here you can see the output when trying to build a 4.6 project:
variables:
  SOLUTION: "MigraBase.sln"
  CONFIGURATION: "Release"
  MSBUILD: "12.0"
  VISUALSTUDIO: "14.0"



Checking out ac6df799 as master...
$ nuget restore $SOLUTION
$ msbuild /tv:$MSBUILD /p:Configuration=$CONFIGURATION;VisualStudioVersion=$VISUALSTUDIO /v:m $SOLUTION
XBuild Engine Version 12.0
Mono, Version 4.2.3.0
Copyright (C) 2005-2013 Various Mono authors

Build started 6/5/2016 1:42:56 PM.
__________________________________________________
/home/gitlab-runner/builds/9c92ad7b/0/gitlab/suprio/migrabase/MigraBase.sln:  warning : Don't know how to handle GlobalSection CodealikeProperties, Ignoring.
Project "/home/gitlab-runner/builds/9c92ad7b/0/gitlab/suprio/migrabase/MigraBase.sln" (default target(s)):
	Target ValidateSolutionConfiguration:
		Building solution configuration "Release|Any CPU".
	Target Build:
		Project "/home/gitlab-runner/builds/9c92ad7b/0/gitlab/suprio/migrabase/Alma.MigraBase.Core/Alma.MigraBase.Core.csproj" (default target(s)):
			Target PrepareForBuild:
				Configuration: Release Platform: AnyCPU
				Created directory "bin/Release/"
				Created directory "obj/Release/"
			Target GetFrameworkPaths:
/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets:  warning : TargetFrameworkVersion 'v4.6' not supported by this toolset (ToolsVersion: 12.0).
			Target GetReferenceAssemblyPaths:
/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets:  warning : Unable to find framework corresponding to the target framework moniker '.NETFramework,Version=v4.6'. Framework assembly references will be resolved from the GAC, which might not be the intended behavior.
Comment 1 Alexander Köplinger [MSFT] 2016-06-06 20:42:12 UTC
This will be fixed in the upcoming Mono 4.4 release (currently in the beta channel).