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?
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.
I know MonoDevelop 5.x+ / Mono 4.x has xbuild/MSBuild support Toolsversion 12. So let check your installation.
Check Mono install:
mono --version
xbuild --version
Check your GAC installation:
gacutil -l |grep Microsoft.Build
Check if you have the MSBuild dll (paths are platform dependent also, change as needed):
Grab your Mono install path from the output above and change the path below to match:
find /Library/Frameworks/Mono.framework/Versions/4.0.2 -name "*MSBuild"
So as you can see I have Tools version 12. Update your install / Re-install as needed ;-)