web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

Error: Proxy type with the name account has been defined by another assembly

Mitch Milam Profile Picture Mitch Milam

I am a big fan of the Simplified Connection technology added by the Xrm.Client assembly and use it almost exclusively.

Recently, I ran into the same issue at two separate customers. Both had just converted from CRM 4.0 and both had plugins and custom ASP.NET web pages in use.

Occasionally, the following exception would be encountered in either the custom ASP.NET pages or within the plugins:

A proxy type with the name account has been defined by another assembly.

Current type: Account, MyAssembly, Version=1.0.0.4, Culture=neutral, PublicKeyToken=be9afbacb707a086,

Existing type: Account, CustomPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

Parameter name: account”

The solution was quite simple:

When creating your connection:

var connection = CrmConnection.Parse(connectionString);

set the ProxyTypesAssembly property:

connection.ProxyTypesAssembly = Assembly.GetExecutingAssembly();

That will instruct .NET to use the executing application as the source for Dynamics CRM proxy types.

I hope that saves you some time.


This was originally posted here.

Comments

*This post is locked for comments