Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
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 126.96.36.199 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=188.8.131.52, 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
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.
The issue was in the test...it was not setting ToolsVersion correctly.