6

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?

1 Answer 1

8

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.