AppVeyor build error MSB3774: Could not find SDK “

2019-06-14 10:27发布

I am getting this MsBuild error when trying to build my Universal Windows Platform (UWP) application with AppVeyor:

C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2048,5): error MSB3774: Could not find SDK "Microsoft.AdMediator.Universal, Version=1.0". [C:\projects\santasegameengine\Source\UI\Santase.UI.WindowsUniversal\Santase.UI.WindowsUniversal.csproj] C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2048,5): error MSB3774: Could not find SDK "Microsoft.Advertising.Xaml, Version=10.0". [C:\projects\santasegameengine\Source\UI\Santase.UI.WindowsUniversal\Santase.UI.WindowsUniversal.csproj]

Here is the full build log: https://ci.appveyor.com/project/NikolayIT/santasegameengine/build/1.0.252

And here is the source code of the app in GitHub: https://github.com/NikolayIT/SantaseGameEngine/tree/master/Source/UI/Santase.UI.WindowsUniversal

How can I fix such an error?

1条回答
太酷不给撩
2楼-- · 2019-06-14 11:03

Adding this as PS (PowerShell) script (as before build script) fixed the problem for me:

enter image description here

Here is the script:

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

And the result:

enter image description here

查看更多
登录 后发表回答