User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 19

Thread: Errors with AdControl

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    MJK's Avatar
    Join Date
    Jun 2006
    Location
    Espoo, Finland
    Posts
    1,162
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Errors with AdControl

    I have followed the help file instructions to set up my test ads to WP app:

    - Enabled ad control from XNA options in application properties
    - Set pubCenter application id to test_client in application properties
    - Added the Ad Control object to the frame in correct size
    - Set Ad Identified of Ad Control object to Image300x50

    Visual Studio Express shows the following errors when building:

    Error 1 The type or namespace name 'Advertising' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) D:\...\adtest\Extensions\CRunXNAAdControl.cs 28 17 adtest

    Error 2 The type or namespace name 'DrawableAd' could not be found (are you missing a using directive or an assembly reference?) D:\...\Extensions\CRunXNAAdControl.cs 235 16 adtest



    Warning 3 Could not resolve this reference. Could not locate the assembly "Microsoft.Advertising.Mobile.Xna, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. adtest

    Warning 4 The referenced component 'Microsoft.Advertising.Mobile.Xna' could not be found.

    Error 6 The type or namespace name 'AdGameComponent' could not be found (are you missing a using directive or an assembly reference?) D:\...\adtest\Game1.cs 29 15 adtest




    Error 7 The name 'AdGameComponent' does not exist in the current context D:\...\adtest\Game1.cs 44 1 adtest

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Can you check the "Microsoft.Advertising.Mobile.Xna" is listed in the "Reference" section of your XNA project?
    Are you sure the Advertising SDK is installed on your machine?

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    MJK's Avatar
    Join Date
    Jun 2006
    Location
    Espoo, Finland
    Posts
    1,162
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, advertising SDK for Windows Phone is installed, and Microsoft.Advertising.Mobile.Xna is there in the References, but as you can see below it's marked with a yellow exclamation sign, and in warnings list it says that "Warning 1 The referenced component 'Microsoft.Advertising.Mobile.Xna' could not be found."
    What should I try to fix it?


  4. #4
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    I really have no clue. If you are not using a version that is too old, the advertising sdk is installed along with XNA SDK.
    I would suggest to uninstall the SDK, load the latest version and reinstall.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    MJK's Avatar
    Join Date
    Jun 2006
    Location
    Espoo, Finland
    Posts
    1,162
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Woohoo! At least test ad is now showing. Uninstalled both the Ad SDK and WP SDK and reinstalled only the WP SDK (which indeed seem to include the Ad SDK as well). So my theory is that last time I actually somehow double-installed the ad SDK (first through WP SDK and then separately Ad SDK) and this messed things up.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleXNA Export Module
    Fusion 2.5 (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Sep 2012
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I reinstalled the Advertising SDK because I was having a similar issue. If I set the Application ID to "test_client" and the Ad Identifier to "Image300_50" I see the Microsoft Advertising dummy ad when I run it through Visual Studio. If I put it to my real Application ID and Ad Identifier, I don't see anything when I deploy to the emulator or my phone. Did you see this same behavior? Maybe ads don't show until it is deployed through the marketplace?

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleXNA Export Module
    Fusion 2.5 (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Sep 2012
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In the entire VS Solution, I can search for "test_client" and find it once in GAME1.CS. I search for "Image300_50" and it isn't anywhere. I was hoping to do a find/replace, but I get the same results as when I saved the application with my actual Application ID and Ad Identifier.

    Looking in the code I see:
    //03
    AdGameComponent.Initialize(this, "test_client");
    adGameComponent = AdGameComponent.Current;
    Components.Add(adGameComponent);

    So is this using the Silverlight/XNA hybrid model?

    I only found AdUnitID mentioned here in the CRunXNAadControl.cs:
    ad=null;
    if (rh.rhApp.advertisements!=null)
    {
    int n;
    for (n=0; n<rh.rhApp.advertisements.size(); n++)
    {
    CDrawableAd ad2=(CDrawableAd)rh.rhApp.advertisements.get(n);
    if (string.Compare(identifier, ad2.ad.AdUnitId)==0)
    {
    ad=ad2;
    break;
    }
    }
    }


    Any advice on getting this working is appreciated. I'm probably 85% complete with my game, but I don't want to publish it until I'm sure I have the ads working. According to the forums on create.msdn.com using my Application ID/Ad Unit I should see real ads when deployed to a device.

  8. #8
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    The code that creates the ad is in the AdControl object : CRunXNAdControl.cs, in the createrunobject function

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleXNA Export Module
    Fusion 2.5 (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Sep 2012
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do I need to modify any of the code in the CRunXNAadControl.cs to get my ad ID?

    ad=null;
    if (rh.rhApp.advertisements!=null)
    {
    int n;
    for (n=0; n<rh.rhApp.advertisements.size(); n++)
    {
    CDrawableAd ad2=(CDrawableAd)rh.rhApp.advertisements.get(n);
    if (string.Compare(identifier, ad2.ad.AdUnitId)==0)

  10. #10
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    You do not need to modify anything : it is done automatically when you build the project (you should rebuild your app as a WP project).
    If it does not work, please zip the project and send it to me....

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Xcode 5 errors - HELP
    By aenever in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 27th October 2013, 12:46 AM
  2. Compilation Errors
    By Fanotherpg in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 26th January 2012, 09:29 AM
  3. Compiling for iOS 5 errors
    By sinister in forum iOS Export Module Version 2.0
    Replies: 4
    Last Post: 7th October 2011, 03:45 PM
  4. Some SWF exporter errors
    By Herbert in forum SWF/Flash Export Module Version 2.0
    Replies: 3
    Last Post: 15th June 2010, 09:55 AM
  5. Odd errors
    By Null1024 in forum The Games Factory 2 - Technical Support
    Replies: 13
    Last Post: 3rd July 2006, 02:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •