在我已经发布的应用程序中,我尝试使用“Microsoft Advertising SDK for XAML”添加广告(尝试通过 NuGet 和 msi 添加引用)。在我的开发机器上,调试和发布版本都工作正常,甚至作为打包一部分创建的 .appxbundle 也能按预期工作,但在提交审核/认证(.appxupload 文件)时,应用程序总是在启动时崩溃。
注意:该应用程序是 Desktop Bridge 应用程序。有一个 UWP 应用程序与 win32 exe 进行通信。启动反馈中心或广告的调用位于 UWP 应用中。
以下是我的项目支持的最大和最小版本-
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.17134.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.14393.0</TargetPlatformMinVersion>
我还尝试在 rd.xml 文件中添加以下条目,希望能够解决任何与反射相关的问题,但没有成功
<Type Name="Microsoft.Advertising" Dynamic="Required All"/>
<Type Name="Microsoft.Advertising.WinRT.UI" Dynamic="Required All"/>
<Namespace Name="Microsoft.Advertising" Serialize="All"/>
<Namespace Name="Microsoft.Advertising.WinRT.UI" Serialize="All"/>
编辑
删除对 Ad SDK 的引用后,应用通过了认证,并且对于审阅者来说没有崩溃。在审核期间崩溃的应用包引用了 Microsoft.Advertising.Xaml
10.1811.1.0
。
最佳答案
临时解决方法是使用 VS 2019 预览版打包应用。 我的应用程序通过了认证并且没有崩溃。
关于c# - 使用 Microsoft Advertising SDK for XAML 时,应用程序在认证期间不断崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54407600/