I have a Xamarin Forms Android build pipeline on Azure DevOps, locally my applications build without a problem. When the pipeline runs, I get the following error when I attempt to do a NuGet Restore (the ios pipeline uses the same settings and restores without an issue).
Error
The imported project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Xamarin\iOS\Xamarin.iOS.CSharp.targets" was not found.
This is the line it fails at when trying to a NuGet Restore
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
I was not getting this issue yesterday and I have not made any .csproj or .sln changes, so I don't know why this issue has raised, appreciate the help.
Build agent
- windows-2022
- NuGet 5.9.1