XXXX is not compatible with monoandroid10.0 - xamarin

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)

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

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.

Related

Local build agent not picking up new build

I have a TFS server on a remote machine, and succesfully installed a build agent on my own machine. The connection between these works as intended:
The agent is online, and running succesfully. However, when I try to queue a build, I get this error:
I think the solution lies in this text:
No agent found in pool Default which satisfies the specified demands:
msbuild
visualstudio
DotNetFramework
Agent.Version -gtVersion 1.98.1
Since I have MSBuild, VS2017 and .Net installed on my machine, I think it's the Agent.Version that's causing problems. But how do I check what version of the agent I have running? I followed this guide to installing the build agent. And where can I find other versions of the build agent online? The MS site doesn't seem to offer download options for older/newer versions of the build agent.
If you installed the agent according your link so the version should be fine (because you downloaded the agent from your TFS).
Go to Agent Pools page, then check the agent's Capabilities.
Look after the the version of MSBuild/VS/.Net, maybe on the agent computer the right version not installed.
Another option - the agent didn't recognize the installed stuff so you can add it to the agent's capabilities manually by click on "Add capability":
I had a similar issue after upgrading Azure DevOps On Premise from 2019 RC2 to 2019 Release. After the upgrade I had to download the new Build Agent from the Azure server and install the new version on my build agents. After upgrading the build agents they began reporting the correct capabilities.

Team City Build Failure Restoring .NET Standard

I'm trying to set up a build configuration for an ASP.NET Core (built on .NET full framework 4.6.2) project.
I'm Using TeamCity Enterprise 2017.2.3 (build 51047)
The .NET Core SDK is installed on the build server, along with 4.6.2 of the .NET Framework.
I am getting the following Build Error Message:
... This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets.
Anyone come across this error before?
I added the latest recommended Nuget exe (4.6.2) as well.
The build step upon which it is failing is a .NET CLI (dotnet) step.
I've set the Command to build
and the Projects to the Solution file.
Dotnet CLI is definitely installed and is version 2.1.300
Yeah update the build tools on the TeamCity server, you're probably using the latest Visual Studio version on your local machine but your build tools on the build server are slightly out of date, probably earlier than v15.5.
https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=15
Also ensure that you have selected to add the .NET Core 2(+) build tools as they include the .NETStandard and aren't selected by default. See https://github.com/dotnet/standard/issues/458#issuecomment-323845208

SonarQube V4 plugin for VSTF 2017

I have just updated the SonarQube plugin to V4 in my VS2017 VNext build but the build is sat waiting for an available agent.
All my agents have MSBuild and Java, are there any other capabilities required for the V4 update.
If I move back to the V3 SonarQube plugin the same build works fines
v4 of the tasks do not add any new demands. However, the new version is written in Node.js rather than PowerShell (so it can run on non-Windows build agents). If you are running an on-premise version of TFS you might need to update your build agents.
FYI when I ran the v4 of the task on TFS2017.2 the build failed with the message No agent found in pool X which satisfies the specified demands: .... Agent.Version -gtVersion 2.119.1
The Microsoft docs for upgrading the agents are here. I ended up downloading the specified version of the agent from the vsts-agents releases page on GitHub.

Why is latest Xamarin needed on local TFS server for CI?

The requirements on the following page state that you need to install Visual Studio with Xamarin on your local TFS server to setup Xamarin CI builds:
https://developer.xamarin.com/guides/cross-platform/ci/intro_to_ci/
topography of the CI
This is a real pain. We have lots of developers that rely on our local TFS server, most of whom don't do any Xamarin development. As such, any changes are heavily scrutinized. This often leads to us not installing the latest VS/Xamarin releases, as it's considered too risky for this vital bit of infrastructure.
We could have a Windows build machine with VS and Xamarin installed, that is connected to a Mac build machine. We'd be free to update the Windows and Mac build machines regularly, without the fear of compromising the TFS server. Is this possible? If not, why not?
Thanks in advance.
That diagram can't be right. There is no reason why you'd need VS or Xamarin installed on your TFS app tier.
I think it's showing a simplified configuration where the Windows build agent is installed alongside the app tier. That is a supported setup but is never, ever recommended by anyone, for exactly the reasons why you don't want to do it.
The diagram is simplified. You don't need to install anything on your TFS server. What you do instead is to install a Build Agent on a separate machine or virtual machine.
The installation details for the TFS 2017 / VSTS build agent v2 can be found in the official visual studio documentation.
The procedure is similar for both TFS and VSTS, where you generate an access token in TFS/VSTS, then simply enter the url for the TFS/VSTS instance when running the build agent install script, along with the access token.
There are build agents for Windows, Linux and macOS, so it is up to you how you configure how iOS builds are made.

TeamCity Warning: No enabled compatible agents for this build configurationn

I'm trying to set up continuous integration at my current place of work. It's not something I've done before so I'm fairly certain that there will be a few steps I've not done or things I'm un-aware of.
I installed TeamCity Professional 7.1.3 on a build server (Windows Server 2008 R2). I've created a simple .NET application that has no database connections and only three NUnit tests. This app uses .NET framework 4.
I set up a build step using NUnit and received a number of errors but I've now resolved them, basically by installing the .NET framework on the build server.
I'm now adding an extra step using Visual Studio but TeamCity now displays the warning 'No enabled compatible agents for this build configuration'.
This question looks similar to mine:
What do I need to install a Visual Studio 2010 (sln)-compatible Build Agent in TeamCity? and it helped me solve the problems I had with NUnit but not for this current problem.
Is there something I've missed during my set-up? If I'm building and running tests with NUnit do I need to bother with this second step?
You installed the full framework, correct -- not just the client pieces? Here's a TeamCity forum post on how to resolve the Unmet requirements:DotNetFramework4.0_x86 exists compatibility error when you've previously installed the framework.

Resources