c# - XAML UWP 应用中的 Microsoft 通用广告客户端 SDK 广告中介器

标签 c# xaml uwp

在我的主要开发机器上,我创建了一个可以部署但缺乏广告的应用程序。值得庆幸的是,在我将工作应用程序提交给源代码管理之后,那台机器坏了并被送去维修。我拿出一台备用机器,检查了我的项目,进行了许多改进,包括在 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\10\ExtensionSDKs\Microsoft.Advertising.Xaml\10.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,Version=10.0,留下了 Microsoft.AdMediator.Universal,Version=1.0 该应用现在将部署并运行,但不会” t 似乎显示添加。我注意到以下警告;

(我不知道如何使用换行来格式化以下内容,因此不需要滚动很多页面宽度。我将其保留为一个段落。)

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

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

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

其他信息 2015 年 10 月 21 日 2008 MST FWIW 两个引用都完好无损,在无法本地部署到我的 Windows 10 笔记本或模拟器中的状态下,我部署到了 Windows Phone 移动模拟器。没有错误,应用程序运行。但似乎没有显示广告。

在应用程序将部署到 Windows 10 本地并显示广告的备用计算机上,广告会同时显示在 win10 模拟器和移动模拟器中。

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

最佳答案

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

我联系了 Microsoft 的一位产品经理,他说;

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 即可部署该应用。

关于c# - XAML UWP 应用中的 Microsoft 通用广告客户端 SDK 广告中介器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33272444/

相关文章:

c# - 发送文件 S3 访问被拒绝

c# - 如何在不丢失原始颜色轨迹的情况下使背景颜色动画为新颜色并返回?

c# - 从 DataTemplate 设置的自定义 DependencyProperty

c# - 有什么方法可以在UWP应用程序和WPF应用程序之间共享代码?

c# - 清除客户端所有文本框

c# - 我可以将包含对象的列表转换为二维数组吗

c# - 如何在 .NET MAUI 中发送和显示获取请求?

c# - UWP 数据绑定(bind) : How to set button command to parent DataContext inside DataTemplate

c# - UWP 可以在 .NET 中运行吗?

c# - 标签从右向左增长