XXXX is not compatible with monoandroid10.0

Viewed 1269

I have a Xamarin project that builds just fine on my local machine but is not building on the azure server. Anyone see this before ?

##[error]The nuget command failed with exit code(1) and error(NU1201: Project XXX.XXXX.XXXXX is not compatible with monoandroid10.0 (MonoAndroid,Version=v10.0). Project XXX.XXXX.XXXXX supports: netstandard2.1 (.NETStandard,Version=v2.1)
2 Answers

If you use Azure pipelines to Build and deploy Xamarin apps, please refer to this doc. And if you use Microsoft-hosted agent, its build environment is different from local machine, such as it may lack of some software or installs different software version. You can see the installed software for each hosted agent by choosing the Included Software link in the table.

To your issue, please check which NuGet version do you use to build this project locally, and then use the NuGet Tool Installer task in Azure pipeline to specify this NuGet version(maybe 5.8.0 works for your issue as Mouse commented) to build your project with Microsoft-hosted agent.

Also you could deploy local self-hosted Windows agent and use it in Azure pipeline to build your project, which will run local build environment.

BTW, you could refer to this doc: Review logs to diagnose pipeline issues to make initial troubleshooting steps when encounter pipeline issues.

Upgrade your nuget version to 5.8 and this will all go away :)

Related