- Home /
Question by
aqib · Apr 07, 2014 at 02:58 PM ·
pluginadmobwindows phone 8
A first chance exception of type 'System.UnauthorizedAccessException' occurred in System.Windows.ni.dll
I am trying to develop a windows phone plugin for unity3d to show admob ads. I am new to Windows Phone. I followed the steps from here. My code for windows phone class library class is:
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GoogleAds;
namespace UnityPluginForWindowsPhone
{
/**
* this class belongs to windows phone class library.
**/
public class TAdmob
{
private static string interstitialAdUnitId;
private static InterstitialAd interstitialAd;
public static void InitInterstitialAd(string adUnitId)
{
interstitialAdUnitId = adUnitId;
interstitialAd = new InterstitialAd(adUnitId);
}
public static void ShowInterstitialAd()
{
AdRequest adRequest = new AdRequest();
interstitialAd.ReceivedAd += OnInterstitialAdRecieved;
interstitialAd.LoadAd(adRequest);
}
private static void OnInterstitialAdRecieved(object sender, AdEventArgs e)
{
interstitialAd.ShowAd();
}
}
}
and my windows class library class is:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace UnityPluginForWindowsPhone
{
/**
* this class belongs to windows class library which is used for the unity editor.
**/
public class TAdmob
{
public static void InitInterstitialAd(string adUnitId)
{
}
public static void ShowInterstitialAd()
{
}
}
}
and I am getting following message in the log:
'TaskHost.exe' (CoreCLR: DefaultDomain): Loaded 'C:\windows\system32\mscorlib.ni.dll'. Cannot find or open the PDB file.
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Windows.RuntimeHost.ni.dll'. Cannot find or open the PDB file.
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Windows.ni.dll'. Cannot find or open the PDB file.
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Net.ni.dll'. Cannot find or open the PDB file.
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\windows\system32\System.ni.dll'. Cannot find or open the PDB file.
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Xml.ni.dll'. Cannot find or open the PDB file.
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\Data\Programs\{857FF137-25B1-462A-BC86-829A1236A776}\Install\UnityPluginTestForWindowsPhone.DLL'. Symbols loaded.
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\windows\system32\Microsoft.Phone.ni.dll'. Cannot find or open the PDB file.
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\windows\system32\Microsoft.Phone.Interop.ni.dll'. Cannot find or open the PDB file.
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\Data\Programs\{857FF137-25B1-462A-BC86-829A1236A776}\Install\WinRTBridge.DLL'. Cannot find or open the PDB file.
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\Data\Programs\{857FF137-25B1-462A-BC86-829A1236A776}\Install\BridgeInterface.winmd'. Module was built without symbols.
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\Data\Programs\{857FF137-25B1-462A-BC86-829A1236A776}\Install\UnityPlayer.winmd'. Module was built without symbols.
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\windows\system32\WinMetadata\Windows.winmd'. Cannot find or open the PDB file.
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Runtime.ni.dll'. Cannot find or open the PDB file.
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Core.ni.dll'. Cannot find or open the PDB file.
Build from '' branch, version is '4.3.4f1 (e444f76e01cd)' (Release build).
Physical memory: 907 MB, commited memory limit: 380 MB.
PlayerConnection initialized from C:/Data/Programs/{857FF137-25B1-462A-BC86-829A1236A776}/Install/Data (debug = 0)
PlayerConnection initialized network socket : 0.0.0.0 55344
Multi-casting "[IP] 192.168.0.114 [Port] 55344 [Flags] 2 [Guid] 352403036 [EditorId] 599262348 [Version] 1048832 [Id] WP8Player(192.168.0.114) [Debug] 0" to [225.0.0.222:54997]...
Direct3D:
Version: Direct3D 11.0 [level 9.3]
Renderer: Qualcomm Adreno 305 (WDDM v1.2) (ID=0x30303330)
Vendor: Qualcomm
VRAM: 98 MB
Initialize engine version: 4.3.4f1 (e444f76e01cd)
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\Data\Programs\{857FF137-25B1-462A-BC86-829A1236A776}\Install\UnityEngine.DLL'. Cannot find or open the PDB file.
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\Data\Programs\{857FF137-25B1-462A-BC86-829A1236A776}\Install\UnityEngineProxy.DLL'. Cannot find or open the PDB file.
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\Data\Programs\{857FF137-25B1-462A-BC86-829A1236A776}\Install\Assembly-CSharp.DLL'. Symbols loaded.
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\Data\Programs\{857FF137-25B1-462A-BC86-829A1236A776}\Install\GoogleAds.DLL'. Symbols loaded.
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\Data\Programs\{857FF137-25B1-462A-BC86-829A1236A776}\Install\UnityPluginForWindowsPhone.DLL'. Symbols loaded.
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'Anonymously Hosted DynamicMethods Assembly'.
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\Data\Programs\{857FF137-25B1-462A-BC86-829A1236A776}\Install\UnityEngineDelegates.winmd'. Module was built without symbols.
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Runtime.InteropServices.WindowsRuntime.ni.dll'. Cannot find or open the PDB file.
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\windows\system32\en-US\mscorlib.debug.resources.dll'. Module was built without symbols.
A first chance exception of type 'System.UnauthorizedAccessException' occurred in Microsoft.Phone.ni.dll
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Runtime.Serialization.ni.dll'. Cannot find or open the PDB file.
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.ni.dll
A first chance exception of type 'System.UnauthorizedAccessException' occurred in System.Windows.ni.dll
I can't figure out what to do. Can anybody know how to solve this?
Comment
Your answer
Follow this Question
Related Questions
Admob Plugin Unity IOS 4 Answers
Admob with Unity 0 Answers
Where can I find Admob android plugin? 2 Answers
play sevices resolver not present in assets. 0 Answers
Does Apple charge or request sth for IOS Admob Incomes? 0 Answers