Could not load file or assembly ‘Microsoft.Xrm.Client at plugin registration

Could not load file or assembly ‘Microsoft.Xrm.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35′ or one of its dependencies. The system cannot find the file specified.

Got this exception during the deployment of a plugin using the xrm library. By questioning the internet I found a lot of sources talking about different versions of dll (32 vs 64 bits) like over here: Could not load file or assembly

Sounds possible but anyways in my case the solution was to add all the xrm dlls to the directory the plugin registration tool is executed.

could_not_load_file_or_assembly_Microsoft_Xrm_Client_stefan_scheller

Complete exception:

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.Xrm.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35′ or one of its dependencies. The system cannot find the file specified.
   at System.Reflection.Assembly._GetExportedTypes()
   at PluginRegistrationTool.AssemblyReader.RetrievePluginsFromAssembly(String path)
   at PluginRegistrationTool.AssemblyReader.RetrievePluginsFromAssembly(String path)
   at PluginRegistrationTool.RegistrationHelper.RetrievePluginsFromAssembly(String pathToAssembly)
   at PluginRegistrationTool.PluginRegistrationForm.btnLoadAssembly_Click(Object sender, EventArgs e)

Advertisement
This entry was posted in Dynamics CRM and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s