I use the latest stable version of Xamarin.Android and Xamarin.Studio. When I try to build an android project, I get the following error:
/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/Microsoft.CSharp.targets: Error: Could not find the executable file of the tool / MSBuild / 14.0 / Bin / mcs.exe
How can I diagnose and fix the problem?
I had this problem while trying to use the C # 6 features in Xamarin's studio on Windows.
In my case, I added the following to the 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 Mac. It should have been:
<PropertyGroup Condition="'$(OS)' != 'Unix'"> <CscToolPath>$(MSBuildProgramFiles32)\MSBuild\14.0\Bin</CscToolPath> </PropertyGroup>
There are several discussions 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