mobile application build failing on Github

asked 2021-04-16T15:48:01.263+00:00
Chris Reed 21 Reputation points

I just deployed a new project to github and setup the CI/CD through Azure Deployment Center. Besides choosing the repo their weren't many things to configure for the build:
88605-image.png

The build is failing in Github but it builds in VS. There are some related errors first, both the android and ios projects fail for a similar error:

D:\a\MobileApplication\MobileApplication\MobileApplication\MobileApplication.Android\MobileApplication.Android.csproj : warning NU1503: Skipping restore for project 'D:\a\MobileApplication\MobileApplication\MobileApplication\MobileApplication.Android\MobileApplication.Android.csproj'. The project file may be invalid or missing targets required for restore. [D:\a\MobileApplication\MobileApplication\MobileApplication.sln]

which is followed by errors for both projects like this:
D:\a\MobileApplication\MobileApplication\MobileApplication\MobileApplication.Android\MobileApplication.Android.csproj(100,2): error MSB4019: The imported project "C:\Users\runneradmin\AppData\Local\Microsoft\dotnet\sdk\5.0.202\Xamarin\Android\Xamarin.Android.CSharp.targets" was not found. Confirm that the expression in the Import declaration "C:\Users\runneradmin\AppData\Local\Microsoft\dotnet\sdk\5.0.202\\Xamarin\Android\Xamarin.Android.CSharp.targets" is correct, and that the file exists on disk.

I assume the second set of errors are caused by the failure to restore? Any help solving this would be greatly appreciated. Google hasn't been much help.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,804 questions
{count} votes