I created a simple plugin and when I was trying to register the plugin through the plugin registration tool I was getting the follwing error
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.Crm.Sdk, 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 System.Reflection.Assembly.GetExportedTypes()
at PluginRegistrationTool.AssemblyReader.RetrievePluginsFromAssembly(String path) in C:\Documents and Settings\arvinds1\Desktop\PluginRegistration\AssemblyReader.cs:line 59
at PluginRegistrationTool.AssemblyReader.RetrievePluginsFromAssembly(String path)
at PluginRegistrationTool.RegistrationHelper.RetrievePluginsFromAssembly(String pathToAssembly) in C:\Documents and Settings\arvinds1\Desktop\PluginRegistration\RegistrationHelper.cs:line 49
at PluginRegistrationTool.PluginRegistrationForm.btnLoadAssembly_Click(Object sender, EventArgs e) in C:\Documents and Settings\arvinds1\Desktop\PluginRegistration\PluginRegistrationForm.cs:line 127
The way I resolved the issue was by adding the microsoft.crm.sdk.dll to my machine’s GAC !!
I hope it works for others as well !!!
Discover more from Nishant Rana's Weblog
Subscribe to get the latest posts sent to your email.

Worked perfectly. Thanks
LikeLike
worked for me too, thanks a lot..
LikeLike
worked for me as well 🙂
LikeLike
The solution is to copy the Microsoft.Crm.Sdk.dll file to Plugin Registration Tool.exe folder. The Microsoft.Crm.Sdk.dll file must reside in the same folder as the executable file.
LikeLike
mthulisi solution work for me. Thanks
LikeLike
it work for me
thanks
LikeLike
Brilliant!!! thank you
LikeLike
It is not working for me,
——————————————————————————–
Could not load file or assembly ‘Microsoft.Crm.Application.Components.Strings’ or one of its dependencies. The system cannot find the file specified.
LikeLike
——————————————————————————–
Could not load file or assembly ‘Microsoft.Crm.Application.Components.Strings’ or one of its dependencies. The system cannot find the file specified.
LikeLike
bot of the above solution mentioned above are not working for me 😦
LikeLike
there is another solution for this problem if above given solution does not works for you.
Check the “Processor Architecture” of the Microsoft.Crm.Sdk.dll in GAC, if it is x86 try to compile you registration tool code and plugin assembly both in x86 format. now register your assembly, it should work now.
LikeLike