none
[UWP] - AdControl doesnt work RRS feed

  • Question

  • Hello, 

    I try to add Advertisments to my app. I used this official instruction:

    https://docs.microsoft.com/en-us/windows/uwp/monetize/adcontrol-in-xaml-and--net

    I added a nuget package Microsoft.Advertising.XAML

    I added a in MainPage.XAML code 

        xmlns:ad="using:Microsoft.Advertising.WinRT.UI"

    I added, AdControl in XAML

            <ad:AdControl ApplicationId="3f83fe91-d6be-434d-a0ae-7351c5a997f1"
                  AdUnitId="test"
                  HorizontalAlignment="Left"
                  Height="250"
                  VerticalAlignment="Top"
                  Width="300"/>

    Now app doesnt see the AdControl element.

    In compilation I have error:

    Unknown type 'AdControl' in XML namespace 'using:Microsoft.Advertising.WinRT.UI'

    How to add an AdControl to the App.


    • Moved by Xavier Xie-MSFT Monday, July 29, 2019 8:41 AM move to correct forum
    Thursday, July 25, 2019 10:56 AM

Answers

All replies