Bug 5427 - Microsoft.Build.Tasks makefile causes incorrect test results
Summary: Microsoft.Build.Tasks makefile causes incorrect test results
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: 2012-05-31 00:04 UTC by Alex Earl
Modified: 2012-05-31 02:22 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 INVALID

Description Alex Earl 2012-05-31 00:04:42 UTC
Microsoft.Build.Tasks makefile generates assemblies with the version in the name. These files are copied to the class/lib/PROFILE directory without renaming them to remove the version, so that when unit tests are run the correct version of the assembly is not loaded and the 2.0.0.0 version is always loaded. This causes tests which require the 3.5 or 4.0 profile version to run to fail.

Msg: Using task Copy from Microsoft.Build.Tasks.Copy, Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Msg: Error executing task Copy: Task does not have property "OverwriteReadOnlyFiles" defined
Msg: Error executing task Copy: Microsoft.Build.BuildEngine.InvalidProjectFileException: Task does not have property "OverwriteReadOnlyFiles" defined
  at Microsoft.Build.BuildEngine.TaskEngine.Prepare (ITask task, System.Xml.XmlElement taskElement, IDictionary`2 parameters, System.Type taskType) [0x00054] in /home/acearl/Projects/mono/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskEngine.cs:91 
  at Microsoft.Build.BuildEngine.BuildTask.Execute () [0x00081] in /home/acearl/Projects/mono/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildTask.cs:105 
Tests run: 211, Failures: 1, Not run: 2, Time: 1.685 seconds
Comment 1 Alex Earl 2012-05-31 00:43:03 UTC
The issue isn't actually that the version is in the name, that is correct, the issue is that the tests don't use the correct version when building the test dll.
Comment 2 Alex Earl 2012-05-31 02:22:49 UTC
The issue was in the test...it was not setting ToolsVersion correctly.