AppVeyor build error MSB3774: Could not find SDK “Microsoft.AdMediator.Universal”

倾然丶 夕夏残阳落幕 提交于 2019-12-13 04:45:30

问题


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:


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

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:



来源:https://stackoverflow.com/questions/33897161/appveyor-build-error-msb3774-could-not-find-sdk-microsoft-admediator-universal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!