Reputation: 11722
I'm using the latest stable version of Xamarin.Android and Xamarin.Studio. When I try to build an android project I'm getting the following error:
/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/Microsoft.CSharp.targets: error : Tool executable '/MSBuild/14.0/Bin/mcs.exe' could not be found
How can I diagnose and fix the issue?
Upvotes: 6
Views: 307
Reputation: 98
I had this problem after trying to use C# 6 features in Xamarin studio on Windows.
In my case I had added the following to my project file:
<PropertyGroup Condition="'$(Platform)' != 'Unix'">
<CscToolPath>$(MSBuildProgramFiles32)\MSBuild\14.0\Bin</CscToolPath>
</PropertyGroup>
which worked fine on Windows, but gave me the error you had, when I tried it on a Mac. It should have been:
<PropertyGroup Condition="'$(OS)' != 'Unix'">
<CscToolPath>$(MSBuildProgramFiles32)\MSBuild\14.0\Bin</CscToolPath>
</PropertyGroup>
There is some discussion here: http://forums.xamarin.com/discussion/42919/how-do-i-tell-xamarin-studio-to-use-a-specific-version-of-msbuild-when-i-have-multiple-versions
Upvotes: 8