Msbuild AppVeyor生成错误MSB3774:找不到SDK“;Microsoft.AdMediator.Universal“;

Msbuild AppVeyor生成错误MSB3774:找不到SDK“;Microsoft.AdMediator.Universal“;,msbuild,build-error,appveyor,Msbuild,Build Error,Appveyor,尝试使用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:\projects\santasegamengine\Source\UI\Santase.U

尝试使用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:\projects\santasegamengine\Source\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,版本=10.0”。[C:\projects\santasegamengine\Source\UI\Santase.UI.WindowsUniversal\Santase.UI.WindowsUniversal.csproj]

以下是完整的生成日志:

以下是GitHub中应用程序的源代码:

如何修复此错误?

将此添加为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
结果是: