1
Vote

AdRotatorExample doesnt work in my VS 2010 Express for Windows Phone

description

AdRotatorExample

I have downloaded the wp7adrotator-1.4-sl-binary and the AdRotatorExample-LocationAware doesn't work

System.Windows.Markup.XamlParseException occurred
Message=Unknown parser error: Scanner 2148474880. [Line: 64 Position: 14]
LineNumber=64
LinePosition=14
StackTrace:
   at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
   at AdRotatorExample.MainPage.InitializeComponent()
   at AdRotatorExample.MainPage..ctor()
   at System.Reflection.RuntimeConstructorInfo.InternalInvoke(RuntimeConstructorInfo rtci, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)
   at System.Reflection.RuntimeConstructorInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)
   at System.Activator.InternalCreateInstance(Type type, Boolean nonPublic, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type)
   at System.Windows.Navigation.PageResourceContentLoader.BeginLoad_OnUIThread(AsyncCallback userCallback, PageResourceContentLoaderAsyncResult result)
   at System.Windows.Navigation.PageResourceContentLoader.<>c__DisplayClass4.<BeginLoad>b__0(Object args)
   at System.Reflection.RuntimeMethodInfo.InternalInvoke(RuntimeMethodInfo rtmi, Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)
   at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at System.Delegate.DynamicInvokeOne(Object[] args)
   at System.MulticastDelegate.DynamicInvokeImpl(Object[] args)
   at System.Delegate.DynamicInvoke(Object[] args)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.Dispatch(DispatcherPriority priority)
   at System.Windows.Threading.Dispatcher.OnInvoke(Object context)
   at System.Windows.Hosting.CallbackCookie.Invoke(Object[] args)
   at System.Windows.Hosting.DelegateWrapper.InternalInvoke(Object[] args)
   at System.Windows.RuntimeHost.ManagedHost.InvokeDelegate(IntPtr pHandle, Int32 nParamCount, ScriptParam[] pParams, ScriptParam& pResult)
InnerException: System.InvalidProgramException
   Message=InvalidProgramException
   StackTrace:
        at System.RuntimeType.GetMemberMethod(String name, BindingFlags invokeAttr, CallingConventions callConv, Int32 argCnt)
        at System.RuntimeType.GetMethodImpl(String name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
        at System.Type.GetMethod(String name, BindingFlags bindingAttr)
        at MS.Internal.ManagedTypeInfoProviderRPInvokes.LookupProperty_End(PropertyInfo propInfo, EventInfo ei, Type type, String name)
        at MS.Internal.ManagedTypeInfoProviderRPInvokes.ResolvePropertyName(XamlTypeToken sTypeToken, String inPropertyName, XamlPropertyToken& outProperty, XamlTypeToken& outPropertyTypeToken)
        at MS.Internal.XcpImports.Application_LoadComponentNative(IntPtr pContext, IntPtr pComponent, UInt32 cUriStringLength, String uriString, UInt32 cXamlStrLength, Byte* pXamlStr, UInt32 cAssemblyStrLength, String assemblyStr)
        at MS.Internal.XcpImports.Application_LoadComponent(IManagedPeerBase componentAsDO, String resourceLocator, UnmanagedMemoryStream stream, UInt32 numBytesToRead, String assemblyString)
        at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
        at AdRotatorExample.MainPage.InitializeComponent()
        at AdRotatorExample.MainPage..ctor()
        at System.Reflection.RuntimeConstructorInfo.InternalInvoke(RuntimeConstructorInfo rtci, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)
        at System.Reflection.RuntimeConstructorInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)
        at System.Activator.InternalCreateInstance(Type type, Boolean nonPublic, StackCrawlMark& stackMark)
        at System.Activator.CreateInstance(Type type)
        at System.Windows.Navigation.PageResourceContentLoader.BeginLoad_OnUIThread(AsyncCallback userCallback, PageResourceContentLoaderAsyncResult result)
        at System.Windows.Navigation.PageResourceContentLoader.<>c__DisplayClass4.<BeginLoad>b__0(Object args)
        at System.Reflection.RuntimeMethodInfo.InternalInvoke(RuntimeMethodInfo rtmi, Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)
        at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)
        at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
        at System.Delegate.DynamicInvokeOne(Object[] args)
        at System.MulticastDelegate.DynamicInvokeImpl(Object[] args)
        at System.Delegate.DynamicInvoke(Object[] args)
        at System.Windows.Threading.DispatcherOperation.Invoke()
        at System.Windows.Threading.Dispatcher.Dispatch(DispatcherPriority priority)
        at System.Windows.Threading.Dispatcher.OnInvoke(Object context)
        at System.Windows.Hosting.CallbackCookie.Invoke(Object[] args)
        at System.Windows.Hosting.DelegateWrapper.InternalInvoke(Object[] args)
        at System.Windows.RuntimeHost.ManagedHost.InvokeDelegate(IntPtr pHandle, Int32 nParamCount, ScriptParam[] pParams, ScriptParam& pResult)

comments

Darkside wrote Jun 1, 2014 at 11:51 AM

Can you confirm you have downloaded all the updated adprovider DLL's and added them to your solution. One of the limitations in V1 is that it requires all providers in the solution, not just the one's you want to use.

You might want to try the V2 beta where one of the things we have resolved is to break this dependency.

If the above doesn't resolve your V1 issue, can you put a sample ptoject on GitHub or dropbox or other download site and we'll take a look at it.

Just tested the V1 NuGet's on a blank project and apart from the false (object not initialised) error, the project runs fine.