I'm opening a .sln
file that I transferred from VS2013 into MonoDevelop. When I attempt this, however, it gives me the following error(s):
1. Project 'foo' has a different ToolsVersion than the containing solution.
2. Error while trying to load the project '/path/to/foo.csproj': Unknown ToolsVersion '12.0'
3. [repeat 2 for every project in the solution]
When I tried doing this for a VS2015 file, it game me the same errors, except this time ToolsVersion
was 14.0
.
My MonoDevelop version is v4.0.12; is there a workaround for this?
I know MonoDevelop 5.x+ / Mono 4.x has xbuild/MSBuild support Toolsversion 12. So let check your installation.
mono --version
Mono JIT compiler version 4.0.2 ((detached/c99aa0c Thu Jun 11 18:53:01 EDT 2015)
xbuild --version
XBuild Engine Version 12.0
Mono, Version 4.0.2.0**
gacutil -l |grep Microsoft.Build
Microsoft.Build, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Microsoft.Build, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Microsoft.Build.Engine, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Microsoft.Build.Engine, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Microsoft.Build.Engine, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Microsoft.Build.Framework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Microsoft.Build.Utilities.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Microsoft.Build.Utilities.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
cat `which xbuild`
#!/bin/sh
exec /Library/Frameworks/Mono.framework/Versions/4.0.2/bin/mono $MONO_OPTIONS /Library/Frameworks/Mono.framework/Versions/4.0.2/lib/mono/xbuild/12.0/bin/xbuild.exe "$@"
find /Library/Frameworks/Mono.framework/Versions/4.0.2 -name "*MSBuild"
/Library/Frameworks/Mono.framework/Versions/4.0.2/lib/mono/4.5/MSBuild
/Library/Frameworks/Mono.framework/Versions/4.0.2/lib/mono/gac/Mono.Addins.MSBuild
/Library/Frameworks/Mono.framework/Versions/4.0.2/lib/mono/gac/policy.0.2.Mono.Addins.MSBuild
/Library/Frameworks/Mono.framework/Versions/4.0.2/lib/mono/gac/policy.0.3.Mono.Addins.MSBuild
/Library/Frameworks/Mono.framework/Versions/4.0.2/lib/mono/gac/policy.0.4.Mono.Addins.MSBuild
/Library/Frameworks/Mono.framework/Versions/4.0.2/lib/mono/gac/policy.0.5.Mono.Addins.MSBuild
/Library/Frameworks/Mono.framework/Versions/4.0.2/lib/mono/gac/policy.0.6.Mono.Addins.MSBuild
/Library/Frameworks/Mono.framework/Versions/4.0.2/lib/mono/xbuild/12.0/bin/MSBuild
/Library/Frameworks/Mono.framework/Versions/4.0.2/lib/mono/xbuild/14.0/bin/MSBuild
So as you can see I have Tools version 12. Update your install / Re-install as needed ;-)
Workarounds are:
Edit the .csproj file and change the Tools Version to 4.0
<Project ToolsVersion="4.0"
If you opt for 2. then you will have to see if the project still builds after this change.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With