"Adrotator Control does not exist in namespace"?

Oct 5, 2013 at 7:27 PM
Edited Oct 5, 2013 at 7:28 PM
Hello,

I am developing a Windows 8 or Windows RT app and I can't seem to get the ad control to my page. I'm following the readme (from the NuGet package) exactly but after adding the namespace reference "xmlns:AdRotatorWin8="clr-namespace:AdRotator;assembly=AdRotator" and adding:
<AdRotatorWin8:AdRotatorControl 
    x:Name="AdRotator"
    AdHeight="90"
    AdWidth="728"
    DefaultSettingsFileUri="defaultAdSettings.xml"
    SettingsUrl="http://adrotator.apphb.com/defaultAdSettingsWindows8dev.xml" />
I get the errors:
  • The name "AdRotatorControl" does not exist in the namespace "clr-namespace:AdRotator;assembly=AdRotator"
  • The type AdRotatorWin8:AdRotatorControl was not found. Verify that you are not missing an assembly reference...
  • Unknown type "AdRotatorControl" in XML namespace "clr-namespace:AdRotator;assembly=AdRotator"
What am I doing wrong? How can I fix this?
Oct 7, 2013 at 8:54 AM
Hmm, will check the documentation but the using statement syntax is wrong for Windows 8, the correct name space code should look like
xmlns:AdRotatorWin8="using:AdRotatorWin8"
Hope this helps
Nov 21, 2013 at 4:00 AM
So I got a similar error in the Windows phone 8 sample using v2. Same error, and my using statement was "using:AdRotator" which it didn't like.

Not sure where to go with that. Could also be related to the version error that VS reported about some windows ad Xaml file. Don't remember the specifics, sorry. I just punted and went with the nugget lib.