Bug 17565 - Builds with System 2.0.0.0 with Build Target of Mono / .NET 4.0
Summary: Builds with System 2.0.0.0 with Build Target of Mono / .NET 4.0
Status: RESOLVED INVALID
Alias: None
Product: Tools
Classification: Mono
Component: xbuild ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-02-03 07:21 UTC by Lasse Numminen
Modified: 2014-02-03 16:14 UTC (History)
1 user (show)

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


Attachments
Example project with Build Target .NET 4.0 and no references. Add System 4.0.0.0 as reference for the project to be able to build. (1.94 KB, application/zip)
2014-02-03 07:21 UTC, Lasse Numminen
Details


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 INVALID

Description Lasse Numminen 2014-02-03 07:21:58 UTC
Created attachment 5959 [details]
Example project with Build Target .NET 4.0 and no references. Add System 4.0.0.0 as reference for the project to be able to build.

If System 4.0.0.0 is not in the references, xbuild builds with System 2.0.0.0 even if build target is Mono / .NET 4.0.
Comment 1 Mikayla Hutchinson [MSFT] 2014-02-03 14:20:13 UTC
What version of Mono?

Can someone confirm how .NET's MSBuild behaves in this case?
Comment 2 Lasse Numminen 2014-02-03 15:16:32 UTC
Mono version 3.2.3.

A friend of mine tried latest VS and the behaviour is the same. He also noted, that new projects automatically include the System 4.0.0.0 in the references. Monodevelop does not do this.
Comment 3 Mikayla Hutchinson [MSFT] 2014-02-03 16:14:32 UTC
I cannot reproduce this. When I build the attached project with xbuild, I get:

Tool /Users/michael/Mono/bockbuild/profiles/monodevelop-mac-dev/build-root/_install/bin/dmcs execution started with arguments: /noconfig /debug:full /debug+ /optimize- /out:obj/x86/Debug/BuildTargetExample.exe Program.cs obj/x86/Debug/.NETFramework,Version=v4.0.AssemblyAttribute.cs /target:exe /define:DEBUG /platform:x86 /reference:/Users/michael/Mono/bockbuild/profiles/monodevelop-mac-dev/build-root/_install/lib/mono/4.0/System.Core.dll /warn:4

It's not building with System.dll 2.0.0.0, it's building without System.dll at all. This is correct, because the project doesn't include a System.dll reference.

I'm assuming you used the "Empty Project" template? It's completely empty, no files or references. Other templates do have a System.dll reference.