Windows phone 8.1 WP8.1 MS Ads“;参数(名称:w)的值无效;

Windows phone 8.1 WP8.1 MS Ads“;参数(名称:w)的值无效;,windows-phone-8.1,ads,Windows Phone 8.1,Ads,您好,我正在Windows Phone 8.1中使用Microsoft广告,收到错误:“参数值无效(名称:w)”。仅在生成发布版本后上载“.appx”文件时。当我在debug或release中运行时,一切都很好,但在我为发布和测试最终的“.appx”文件而构建之后就不行了 问题中的错误只是假设显示广告的“宽度”没有设置,但设置了。此外,因为它在正常的构建中工作,而不是最终的构建,所以这毫无意义 我的软件是:Windows 8.1、Visual Studio 2013更新5 RC、Windows

您好,我正在Windows Phone 8.1中使用Microsoft广告,收到错误:“参数值无效(名称:w)”。仅在生成发布版本后上载“.appx”文件时。当我在debug或release中运行时,一切都很好,但在我为发布和测试最终的“.appx”文件而构建之后就不行了

问题中的错误只是假设显示广告的“宽度”没有设置,但设置了。此外,因为它在正常的构建中工作,而不是最终的构建,所以这毫无意义

我的软件是:Windows 8.1、Visual Studio 2013更新5 RC、Windows Phone 8.1(已测试多台设备)。我是否可以尝试一些代码剥离或选项来影响最终构建?或者VS2013 Update5 RC中是否存在缺陷

创建广告时,应务实地设定以下值:

adControl = new AdControl();
adControl.IsAutoRefreshEnabled = true;
adControl.IsEngagedChanged += adControl_IsEngagedChanged;
adControl.AdRefreshed += adControl_AdRefreshed;
adControl.ErrorOccurred += adControl_ErrorOccurred;
adControl.ApplicationId = "xxxxx";
adControl.AdUnitId = "xxxxx";
adControl.Width = 480;
adControl.Height = 80;
adControl.HorizontalAlignment = HorizontalAlignment.Center;
adControl.VerticalAlignment = VerticalAlignment.Bottom;
WinRTPlugin.AdGrid.Children.Add(adControl);

看起来需要设置此值:“adControl.SetValue(Windows.UI.Xaml.Controls.Canvas.ZIndexProperty,98);”