首页 > 解决方案 > DevOpS 无法构建 Xamarin 应用程序

问题描述

我有一个 Xamarin 应用程序(Windows 和 Android)。它编译运行。但是,当我尝试在 DevOps 中构建它时,我收到如下所示的错误。我不知道如何解决它,希望有任何帮助谢谢

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\msbuild.exe "C:\Users\VssAdministrator\AppData\Local\Temp\NuGetScratch\gepi4ll2.pci.nugetinputs.targets" /t:GenerateRestoreGraphFile /nologo /nr:false /v:q /p:NuGetRestoreTargets="C:\Users\VssAdministrator\AppData\Local\Temp\NuGetScratch\ak3xdawe.wl0.nugetrestore.targets" /p:RestoreTaskAssemblyFile="C:\hostedtoolcache\windows\NuGet\4.4.1\x64\nuget.exe" /p:RestoreSolutionDirectory="D:\a\9\s" /p:RestoreConfigFile="D:\a\9\Nuget\tempNuGet_10.config" /p:SolutionDir="D:\a\9\s"
NuGet.CommandLine.ExitCodeException: Exception of type 'NuGet.CommandLine.ExitCodeException' was thrown.
   at NuGet.CommandLine.MsBuildUtility.<GetProjectReferencesAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.CommandLine.RestoreCommand.<GetDependencyGraphSpecAsync>d__48.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.CommandLine.RestoreCommand.<DetermineInputsFromMSBuildAsync>d__43.MoveNext()
##[error]The nuget command failed with exit code(1) and error(C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(725,2): error XA0000: Could not determine API level for $(TargetFrameworkVersion) of 'v10.0'. [D:\a\9\s\App1.Android\MyApp.Android.csproj])
##[error]Packages failed to restore

标签: androidxamarinnugetazure-pipelines

解决方案


推荐阅读