XAML UWP 应用中的 Microsoft 通用广告客户端 SDK 广告中介

Microsoft Universal Ad Client SDK ad Mediator in XAML UWP apps

在我的主要开发机器上,我创建了一个可以部署但没有广告的应用程序。那台机器坏了并被送去维修,谢天谢地,在我将工作应用程序提交给源代码管理之后。我调出了一台备用机器,检查了我的项目,进行了许多改进,包括在 windows 10 UWP 应用程序中成功显示添加。在我的主要开发机器上完成修复后,我更新了模板,以及在修复过程中发生变化的 SDK,“我相信我得到了它们”。我检查了该项目,并在成功构建后尝试部署和调试。

2>------ Deploy started: Project: Decisive.Uwp.T10, Configuration: Debug x86 ------
2>Updating the layout...
2>Copying files: Total 1 mb to layout...
2>Checking whether required frameworks are installed...
2>Framework: Microsoft.Advertising.Xaml/x86, app package version 10.0.1510.0 is not currently installed.
2>Installing missing frameworks...
2>Error : DEP0800 : The required framework "C:\Program Files (x86)\Microsoft SDKs\Windows Kits\ExtensionSDKs\Microsoft.Advertising.Xaml.0\.\AppX\x86\Microsoft.Advertising.Xaml.x86.10.0.appx" failed to install. 
2>error 0x80070005: Opening the package from location Microsoft.Advertising.Xaml.x86.10.0.appx failed.
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

我删除了 Microsoft.Advertising.Xaml,版本=10.0,留下了 Microsoft.AdMediator.Universal,版本=1.0 应用程序现在将部署和 运行 但似乎不显示添加。我注意到以下警告;

(我不知道如何用wrap格式化下面的内容,所以它不需要滚动很多页宽。我把它留作段落了。)

SDK "Microsoft.AdMediator.Universal, Version=1.0" 依赖于以下 SDK "Microsoft.Advertising.Xaml, Version=10.0",它们尚未添加到项目中或未找到。请确保将这些依赖项添加到项目中,否则您可能会遇到 运行 时间问题。您可以通过引用管理器向您的项目添加依赖项。

这两个库的版本在用于创建此应用程序的两台机器之间匹配。

我在尝试解决此错误时不知所措错误:DEP0800:所需的框架"C:\Program Files (x86)\Microsoft SDKs\Windows Kits\ExtensionSDKs\Microsoft.Advertising.Xaml.0.\AppX\x86\Microsoft.Advertising.Xaml.x86.10.0.appx" 安装失败。

附加信息 10/21/2015 2008 MST FWIW 在两个引用都完好无损的情况下,在无法在本地或模拟器中部署到我的 windows 10 笔记本的状态下,我部署到了 windows phone 移动模拟器。没有错误,应用 运行s。虽然似乎没有显示广告。

应用将部署到windows10本地并显示广告的备用机器上,win10模拟器和移动模拟器都显示广告。

附加信息 2015 年 10 月 22 日 0930 MST this post 上关于 WinTools 1.1、TypeScript 1.6 RTM 和 Apache Cordova 更新工具 的评论可能会阐明该问题。他们详细说明了一些开发人员在安装 AdMediator 显然依赖的 win 工具 1.1 更新时遇到的问题。

我有一些很好的后见之明,你可以看到我做了什么假设。

我联系了 Microsoft 的一位 PM,他说;

Yes, we are aware of the issue that you are talking about. But that issue might be a red herring in this context – it is all about just false notifications showing up when you do the upgrade. That should not have really caused the issue with the AdControl (if you truly had the issue with a bogus install of the tools, you could not even create or build a UWP app of any kind).

最终我尝试 运行 Visual Studio 作为管理员。我能够部署该应用程序。之后我退出 Visual Studio 然后以正常权限重新启动。我现在可以在没有 运行 Visual Studio 作为管理员的情况下部署应用程序。