question

ChrisReed-0916 avatar image
0 Votes"
ChrisReed-0916 asked JessieZhang-2116 commented

mobile application build failing on Github

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.


dotnet-xamarin
image.png (5.6 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Since Xamarin build successfully in your local environment, it's suggested to involve the proper product team to get more insights.
Are you using devops to CI/CD? Or are you using some other services in Azure?
If you're using Devops, it's suggested to open ticket in https://developercommunity.visualstudio.com/spaces/21/index.html since Azure Devops is not supported in Q&A for now.
If you're using other services in Azure, please also include related tag for your question, all supported products in Microsoft Q&A are listed here: https://docs.microsoft.com/en-us/answers/products

1 Vote 1 ·

0 Answers