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?
To use the Xamarin Android SDK Manager, you will need the following: Visual Studio 2022 Community, Professional, or Enterprise. Visual Studio 2019 Community, Professional, or Enterprise. OR Visual Studio 2017 (Community, Professional, or Enterprise edition).
If you are facing this issue in Cross platform application with Xamarin. Forms version above 3.2, check whether any Android support library packages are installed. If installed, kindly uninstall those support library packages and set the Target Platform to 9.0, clean the project and build it again.
NET MAUI (. NET Multi-platform App UI) is now a project type among the five Desktop & Mobile options in Visual Studio 2022 17.3 Preview 1, replacing the Xamarin-based option. . NET MAUI is described by Microsoft as the evolution of mobile-centric Xamarin.
In May 2020, Microsoft announced that Xamarin. Forms, a major component of its mobile app development framework, would be deprecated in November 2021 in favour of a new . Net based product called MAUI - Multiform App User Interface.
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
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