尝试使用AppVeyor构建通用Windows平台(UWP)应用程序时,我收到此MsBuild错误:
C:\ Program Files(x86)\ MSBuild \ 14.0 \ bin \ Microsoft.Common.CurrentVersion.targets(2048,5):错误MSB3774:找不到SDK“Microsoft.AdMediator.Universal,Version = 1.0”。 [C:\项目\ santasegameengine \源\ UI \ Santase.UI.WindowsUniversal \ Santase.UI.WindowsUniversal.csproj] C:\ Program Files(x86)\ MSBuild \ 14.0 \ bin \ Microsoft.Common.CurrentVersion.targets(2048,5):错误MSB3774:找不到SDK“Microsoft.Advertising.Xaml,Version = 10.0”。 [C:\项目\ santasegameengine \源\ UI \ Santase.UI.WindowsUniversal \ Santase.UI.WindowsUniversal.csproj]
以下是完整的构建日志:https://ci.appveyor.com/project/NikolayIT/santasegameengine/build/1.0.252
以下是GitHub中应用程序的源代码:https://github.com/NikolayIT/SantaseGameEngine/tree/master/Source/UI/Santase.UI.WindowsUniversal
如何解决此类错误?
答案 0 :(得分:0)
将此添加为PS(PowerShell)脚本(与构建脚本之前一样)为我解决了问题:
这是脚本:
Write-Host "Installing Microsoft Universal Ad Client SDK..."
$msiPath = "$($env:USERPROFILE)\AdMediator.msi"
(New-Object Net.WebClient).DownloadFile('https://visualstudiogallery.msdn.microsoft.com/401703a0-263e-4949-8f0f-738305d6ef4b/file/146057/6/AdMediator.msi', $msiPath)
cmd /c start /wait msiexec /i $msiPath /quiet
Write-Host "Installed" -ForegroundColor green
结果: