我正在开发WP 8 / 8.1应用程序。我面临的问题是,当我使用" Adcontrol"工具然后它下面显示一条蓝线,它给我以下错误。
Error 1 The name "AdControl" does not exist in the namespace "clr-namespace:Microsoft.Advertising.Mobile.UI;assembly=Microsoft.Advertising.Mobile.UI". C:\Users\PraneetSah\Documents\app_3\AppStudio.UI\Views\MainPage.xaml 45 11 AppStudio.UI
Error 2 The type or namespace name 'Advertising' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) C:\Users\PraneetSah\Documents\app_3\AppStudio.UI\Views\MainPage.xaml.cs 5 17 AppStudio.UI
Warning 3 The referenced component 'Microsoft.Advertising.Mobile' could not be found. AppStudio.UI
Warning 4 The referenced component 'Microsoft.Advertising.Mobile.UI' could not be found. AppStudio.UI
Error 5 The type 'ads:AdControl' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. C:\Users\PraneetSah\Documents\app_3\AppStudio.UI\Views\MainPage.xaml 45 12 AppStudio.UI
就是这样;我的SDK /工作室都安装在他们的默认位置,但我目前正在处理的项目不在默认位置,并且存在于Documents {custom-folder \ ...所以这可能是问题?或者是其他东西?请帮帮我。以下是我正在使用的adcontrol代码(请注意,它在下面显示蓝线 广告:广告控制":
<ads:AdControl Width="480" Height="80"
ApplicationId="XXXXXX" AdUnitId="XXXXXX"
IsAutoCollapseEnabled="True"
IsAutoRefreshEnabled="True"
HorizontalAlignment="Center"/>
答案 0 :(得分:0)
您需要向xaml添加广告命名空间。 这应该由Microsoft示例源代码涵盖,请查看它们。