Windows Phone Developer Tools April 2010 Refresh and the OData Client


Two months ago we released an OData Library for the Windows Phone 7 – see the blog post here. If you have downloaded the recent April 2010 Refresh of the Windows Phone Developer Tools you will have found that there is an issue in the refresh of the tools with loading the OData library. If you reference the System.Data.Services.Client.dll assembly from the April 2010 Refresh of the tools and try to deploy your project you will see the following message (thanks to Tim Heuer for point this out):

image

The specific text of the error message is “Could not load file or assembly ‘{File Path}\System.Data.Services.Client.dll’ or one of its dependencies”.

This is an issue with the way Authenticode signed assemblies are loaded in the new version of the tools. Included in the blog post by Tim Heuer is a PowerShell script that resolves the issue when run against the System.Data.Services.Client.dll assembly from the OData Windows Phone 7 library.

 

Shayne Burgess

Program Manager II

WCF Data Services


Comments (3)

  1. annakhulet12 says:

    this info is great!!

  2. Shalan007 says:

    Great Info. Unfortunately there seems to be some issues in the lib (or in my program).

    If I try to call LoadAsync with anything more complex than the basic contex.entityCollection the following exception will be thrown:

    A first chance exception of type 'System.MethodAccessException' occurred in WP7_CTP_Fix_System.Data.Services.Client.dll

    Error:System.MethodAccessException: MethodAccessException

      at System.Reflection.RuntimeConstructorInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)

      at System.Activator.InternalCreateInstance(Type type, BindingFlags invokeAttr, Binder binder, Object[] args, CultureInfo culture, StackCrawlMark& stackMark)

      at System.Activator.CreateInstance(Type type, Object[] args)

      at IQToolkit.ExpressionEvaluator.EvaluatorBuilder.Constant(ConstantExpression c)

      at IQToolkit.ExpressionEvaluator.EvaluatorBuilder.Build(Expression exp)

      at IQToolkit.ExpressionEvaluator.EvaluatorBuilder.MemberAccess(MemberExpression mLebensmittel Loaded

    Strange. Maybe a limitation in the WP7? I have not found any way to use linq for querying the data…

    Any idea?

  3. Shalan007 says:

    Great Info. Unfortunately there seems to be some issues in the lib (or in my program).

    If I try to call LoadAsync with anything more complex than the basic contex.entityCollection the following exception will be thrown:

    A first chance exception of type 'System.MethodAccessException' occurred in WP7_CTP_Fix_System.Data.Services.Client.dll

    Error:System.MethodAccessException: MethodAccessException

      at System.Reflection.RuntimeConstructorInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)

      at System.Activator.InternalCreateInstance(Type type, BindingFlags invokeAttr, Binder binder, Object[] args, CultureInfo culture, StackCrawlMark& stackMark)

      at System.Activator.CreateInstance(Type type, Object[] args)

      at IQToolkit.ExpressionEvaluator.EvaluatorBuilder.Constant(ConstantExpression c)

      at IQToolkit.ExpressionEvaluator.EvaluatorBuilder.Build(Expression exp)

      at IQToolkit.ExpressionEvaluator.EvaluatorBuilder.MemberAccess(MemberExpression mLebensmittel Loaded

    Strange. Maybe a limitation in the WP7? I have not found any way to use linq for querying the data…

    Any idea?