locked
Plugin Regestration tool errors RRS feed

  • Question

  • I am new to plugin development, This is my first. I have gotten the following errors when loading the .dll into the tool, any thoughts?

     

    Unhandled Exception: System.IO.InvalidDataException: Assembly name MSCRM Plug-in1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null cannot be parsed.
       at PluginRegistrationTool.AssemblyReader.RetrieveAssemblyProperties(Assembly assembly, String path) in C:\sdk\tools\pluginregistration\AssemblyReader.cs:line 167
       at PluginRegistrationTool.AssemblyReader.RetrievePluginsFromAssembly(String path) in C:\sdk\tools\pluginregistration\AssemblyReader.cs:line 55
       at PluginRegistrationTool.AssemblyReader.RetrievePluginsFromAssembly(String path)
       at PluginRegistrationTool.RegistrationHelper.RetrievePluginsFromAssembly(String pathToAssembly) in C:\sdk\tools\pluginregistration\RegistrationHelper.cs:line 49
       at PluginRegistrationTool.PluginRegistrationForm.btnLoadAssembly_Click(Object sender, EventArgs e) in C:\sdk\tools\pluginregistration\PluginRegistrationForm.cs:line 127


    Thanks Scott Coates North America Traffic
    Wednesday, May 12, 2010 3:13 PM

Answers

  • I  think this  is because  the plugin  is compiled on 64bit and Plugin  Registration tool is complied on  the other 32bit.  see  below.  One  solution is to  comple  the plugin registration  tool  on  64  bit  (but remember  to  change the compile mode to 64 bit in project  properties window).

    http://social.microsoft.com/Forums/en/crmdevelopment/thread/d9e3ca49-b851-4cd5-9f64-6eea5c1e2f38

    did  u try the suggestion here

    http://code.msdn.microsoft.com/crmplugin/Thread/View.aspx?ThreadId=1207

     

    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

     

    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

     

    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

    Muhammad Ali Khan
    http://malikhan.wordpress.com
    • Proposed as answer by Muhammad Ali Khan Wednesday, May 12, 2010 7:05 PM
    • Marked as answer by W_Coates Wednesday, May 12, 2010 7:26 PM
    Wednesday, May 12, 2010 6:58 PM

All replies

  • Your assembly doesn't have an SN Key. Do one thing, Go to your project, right click ==> properties, Generate SN.Key (File) for the project, build the assembly and then try to register it using the plugin tool
    Muhammad Ali Khan
    http://malikhan.wordpress.com
    Wednesday, May 12, 2010 3:18 PM
  • when I right click on properties the only option is open.
    Thanks Scott Coates North America Traffic
    Wednesday, May 12, 2010 3:28 PM
  • this is the error now.

     

    Unhandled Exception: System.IO.InvalidDataException: Assembly name MSCRM Plug-in1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9d75095374ce377a cannot be parsed.

       at PluginRegistrationTool.AssemblyReader.RetrieveAssemblyProperties(Assembly assembly, String path) in C:\sdk\tools\pluginregistration\AssemblyReader.cs:line 167

       at PluginRegistrationTool.AssemblyReader.RetrievePluginsFromAssembly(String path) in C:\sdk\tools\pluginregistration\AssemblyReader.cs:line 55

       at PluginRegistrationTool.AssemblyReader.RetrievePluginsFromAssembly(String path)

       at PluginRegistrationTool.RegistrationHelper.RetrievePluginsFromAssembly(String pathToAssembly) in C:\sdk\tools\pluginregistration\RegistrationHelper.cs:line 49

       at PluginRegistrationTool.PluginRegistrationForm.btnLoadAssembly_Click(Object sender, EventArgs e) in C:\sdk\tools\pluginregistration\PluginRegistrationForm.cs:line 127

     


    Thanks Scott Coates North America Traffic
    Wednesday, May 12, 2010 3:40 PM
  • I removed the spaces from the .dll

    now I get this 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 PluginRegistrationTool.AssemblyReader.RetrievePluginsFromAssembly(String path) in C:\sdk\tools\pluginregistration\AssemblyReader.cs:line 59
       at PluginRegistrationTool.AssemblyReader.RetrievePluginsFromAssembly(String path)
       at PluginRegistrationTool.RegistrationHelper.RetrievePluginsFromAssembly(String pathToAssembly) in C:\sdk\tools\pluginregistration\RegistrationHelper.cs:line 49
       at PluginRegistrationTool.PluginRegistrationForm.btnLoadAssembly_Click(Object sender, EventArgs e) in C:\sdk\tools\pluginregistration\PluginRegistrationForm.cs:line 127

     


    Thanks Scott Coates North America Traffic
    Wednesday, May 12, 2010 5:40 PM
  • Note If an exception dialog box is displayed containing a "System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Crm.Sdk'" message, the plug-in registration tool cannot find the Microsoft.Crm.Sdk.dll assembly that it requires. Copy that assembly from the SDK\Bin folder to the folder containing the tool's executable file and try again.

    http://msdn.microsoft.com/en-us/library/bb955365.aspx

    http://code.msdn.microsoft.com/crmplugin/Thread/View.aspx?ThreadId=1207


    Muhammad Ali Khan
    http://malikhan.wordpress.com
    Wednesday, May 12, 2010 6:03 PM
  • http://msdn.microsoft.com/en-us/library/bb955365.aspx


    Muhammad Ali Khan
    http://malikhan.wordpress.com

    followed the instructions on the link to a T. The error happens when I go to "register new assembly" then browse for the dll file and select it and then error.

     

    it says  Unable to load the specified Assembly

               Would you like to see the detail for the error?

     

    I click yes and this is what is says now.

    Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'Microsoft.Crm.Sdk, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. An attempt was made to load a program with an incorrect format.
       at System.Reflection.Assembly._GetExportedTypes()
       at PluginRegistrationTool.AssemblyReader.RetrievePluginsFromAssembly(String path) in C:\sdk\tools\pluginregistration\AssemblyReader.cs:line 59
       at PluginRegistrationTool.AssemblyReader.RetrievePluginsFromAssembly(String path)
       at PluginRegistrationTool.RegistrationHelper.RetrievePluginsFromAssembly(String pathToAssembly) in C:\sdk\tools\pluginregistration\RegistrationHelper.cs:line 49
       at PluginRegistrationTool.PluginRegistrationForm.btnLoadAssembly_Click(Object sender, EventArgs e) in C:\sdk\tools\pluginregistration\PluginRegistrationForm.cs:line 127

     


    Thanks Scott Coates North America Traffic
    Wednesday, May 12, 2010 6:47 PM
  • I  think this  is because  the plugin  is compiled on 64bit and Plugin  Registration tool is complied on  the other 32bit.  see  below.  One  solution is to  comple  the plugin registration  tool  on  64  bit  (but remember  to  change the compile mode to 64 bit in project  properties window).

    http://social.microsoft.com/Forums/en/crmdevelopment/thread/d9e3ca49-b851-4cd5-9f64-6eea5c1e2f38

    did  u try the suggestion here

    http://code.msdn.microsoft.com/crmplugin/Thread/View.aspx?ThreadId=1207

     

    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

     

    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

     

    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

    Muhammad Ali Khan
    http://malikhan.wordpress.com
    • Proposed as answer by Muhammad Ali Khan Wednesday, May 12, 2010 7:05 PM
    • Marked as answer by W_Coates Wednesday, May 12, 2010 7:26 PM
    Wednesday, May 12, 2010 6:58 PM