AppVeyor构建错误MSB3774:找不到SDK"Microsoft.AdMediator.Universal"; [英] AppVeyor build error MSB3774: Could not find SDK "Microsoft.AdMediator.Universal"

查看:121
本文介绍了AppVeyor构建错误MSB3774:找不到SDK"Microsoft.AdMediator.Universal";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用AppVeyor构建通用Windows平台(UWP)应用程序时出现MsBuild错误:

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):错误MSB3774:找不到SDK"Microsoft.AdMediator.Universal,版本= 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):错误MSB3774:找不到SDK"Microsoft.Advertising.Xaml,Version = 10.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.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]

这是完整的构建日志: https://ci.appveyor .com/project/NikolayIT/santasegameengine/build/1.0.252

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

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

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

如何解决此类错误?

推荐答案

将其添加为PS(PowerShell)脚本(与之前的构建脚本一样)为我解决了该问题:

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

这是脚本:

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

结果:

这篇关于AppVeyor构建错误MSB3774:找不到SDK"Microsoft.AdMediator.Universal";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆