Wiki Link: [discussion:1207]
Could not load file or assembly. The system cannot find the file specified. 

Jan 22 2009 at 11:32 AM
hi,

This is our first time using this tool. We have had a dll created and we are trying to register it. When we select it to be analyzed we get the following:

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'PluginRegistration, Version=2.2.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(String assemblyName, String typeName)
at System.AppDomain.CreateInstance(String assemblyName, String typeName)
at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName)
at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName)
at PluginRegistrationTool.RegistrationHelper.RetrievePluginsFromAssembly(String pathToAssembly)
at PluginRegistrationTool.PluginRegistrationForm.btnLoadAssembly_Click(Object sender, EventArgs e)

Any idea's?

thanks

Coordinator
Jan 23 2009 at 2:32 AM
Please go through the Walkthough in using the tool. You need to point to the pluginassemblies that you developed and contain plugins... For samples look at the http://code.msdn.com/crmpluginsamples
You have to strongly sign the Plugin assemblies.

Thanks
Ajithg

Jan 29 2009 at 9:07 PM
I am having the exact same problem - and I have signed my plug-in assemblies. These load fine in version 2.0.0.0 of this tool. I am just using the .exe file to run the registration tool. Any ideas why this is failing? I am confused as to why the error message is telling me it is having a problem loading an assembly named "PluginRegistration" when that is the name of the tool I am using, not the file I am trying to load

Feb 9 2009 at 5:49 PM
I had the same problem. At first I assumed that something was wrong in my code. But after trying to register the sample plugins from http://code.msdn.com/crmpluginsamples I got still the same error. Like riv I was wondering about the missing assembly called PluginRegistration. After a lot of investigation I solved my problem by compiling the tool on my own system (Windows 2008 Server 64bit). Perhaps this is due to different bit-architectures.

Greetings from Germany

Michael

Feb 18 2009 at 10:00 AM
Had the same problem and I gave up using the 2.2 version of the tool.
I downloaded version 2.1 and it worked first time without the error.

Mar 4 2009 at 2:20 AM
I encountered the same issue in V2.2. The V2.1 did not have this problem!

Coordinator
Apr 8 2009 at 7:31 PM
I had fixed this issue now. All you had to do was rename the .exe to PluginRegistration.exe instead of PluginRegistration_2.2.exe. If you had built the project you would not have this issue.

Nov 30 2009 at 4:56 PM
I had the same issue. I was using the plug in reg tool copied from another server. Just re-compile the 2.2 tool on the same server you're compiling the plug in on.

Dec 14 2011 at 10:02 AM
Edited Dec 14 2011 at 10:03 AM
I am working on Windows 7 (64-Bit) Machine. I am using VS 2008 to write my Plugins.
I want to register my Plugin.dll on a 32-bit Windows Server 2003.

I have tried the following but have unsuccessful:
1) Compile Plugin.Dll as a x86 output.
2) Compile Plugin.Dll as a x64 output.
3) Compile Plugin Registration Tool as a x86 output and tried registering dll compiled as x86.
4) Compile Plugin Registration Tool as a x86 output and tried registering dll compiled as x64.
5) Compile Plugin Registration Tool as a x64 output and tried registering dll compiled as x86.
6) Compile Plugin Registration Tool as a x64 output and tried registering dll compiled as x64.

None of the above worked. Please let me know how do i register the dll from my 64bit machine


Updating...
Page view tracker