Search Unity

'FileNotFoundException' when trying to include Microsoft Ads SDK

Discussion in 'Windows' started by cstehreem, May 16, 2015.

  1. cstehreem

    cstehreem

    Joined:
    Oct 31, 2013
    Posts:
    9
    I am using Unity 4.6.1f1. I built my project for Windows Phone 8.1 and deployed it on my phone, everything worked fine. Now I am trying to add Microsoft Advertising SDK and when I deploy the project it gives this exception:

    A first chance exception of type 'System.IO.FileNotFoundException' occurred in Template.exe

    Exception occurs at:

    appCallbacks = new AppCallbacks(false);

    It doesn't say which file is missing. How can I find out which file is being referred to and how can I fix this issue?

    I am using Visual Studio 2013 Update 5 RC
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,735
    Do you add advertising to the generated solution?
    One thing to try is to uninstall app from phone and then try to deploy it.
     
  3. cstehreem

    cstehreem

    Joined:
    Oct 31, 2013
    Posts:
    9
    Yes I referenced SDK from Visual Studio.
    Tried to uninstall and then deploy, same error.
     
  4. cstehreem

    cstehreem

    Joined:
    Oct 31, 2013
    Posts:
    9
    I am getting this in output window:

    'Template.exe' (CoreCLR: DefaultDomain): Loaded 'C:\windows\system32\mscorlib.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'Template.exe' (CoreCLR: .): Loaded 'C:\Data\SharedData\PhoneTools\AppxLayouts\63c4479d-f3aa-4bac-a2fc-b29ff056e8e2VS.Master_ARM.Tehreem\Template.exe'. Symbols loaded.
    'Template.exe' (CoreCLR: .): Loaded 'C:\windows\system32\SYSTEM.RUNTIME.NI.DLL'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'Template.exe' (CoreCLR: .): Loaded 'C:\windows\system32\WinMetadata\Windows.winmd'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'Template.exe' (CoreCLR: .): Loaded 'C:\Data\SharedData\PhoneTools\AppxLayouts\63c4479d-f3aa-4bac-a2fc-b29ff056e8e2VS.Master_ARM.Tehreem\UnityPlayer.winmd'. Module was built without symbols.
    'Template.exe' (CoreCLR: .): Loaded 'C:\windows\system32\SYSTEM.RUNTIME.INTEROPSERVICES.WINDOWSRUNTIME.NI.DLL'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'Template.exe' (CoreCLR: .): Loaded 'C:\windows\system32\System.Runtime.WindowsRuntime.NI.DLL'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'Template.exe' (CoreCLR: .): Loaded 'C:\windows\system32\en-US\mscorlib.debug.resources.dll'. Module was built without symbols.
    A first chance exception of type 'System.IO.FileNotFoundException' occurred in Template.exe

    Also I updated unity to 5.0.2f1
     
  5. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    This error should go away with 5rc. It did for me but you need to delete the folder you built the windows target to otherwise it doesn't seem to create the project correctly.
     
  6. cstehreem

    cstehreem

    Joined:
    Oct 31, 2013
    Posts:
    9
    I did this several times but it never worked. However this time it magically seemed to have solved the problem! Maybe I was skipping some important files before...
    For others who might face the issue here is the list of things I did:

    • Updated everything (Unity, VS, MS Ads SDK)
    • Deleted all the files related to the exported solution
    • Re-exported the project
    • Referenced ads SDK and Microsoft Visual Studio C++ 2013 Runtime Package for Windows Phone
    • Deleted the app from device
    Ads are now working. Thankyou
     
  7. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    I hate to break this to you as I've just gone thru and released a game to Windows but you will be lucky to get any downloads. I've been live for a week now and have had one purchase of a full price version and about 40 downloads of a free version. So don't hold your breath!
     
  8. cstehreem

    cstehreem

    Joined:
    Oct 31, 2013
    Posts:
    9
    That is disappointing! What promotion method are you using?