locked
Could not load type ' xx ' from assembly because the method ' yy ' has no implementation (no RVA) RRS feed

  • Question

  • I am trying to merge two DLL with ilmerge in VS2015 but I am receiving this error when registering the merged DLL with the 2016 plugin registration tool. Here is the error log ... I tried removing the DLL's, and downgrading the .net version on the assemblies but no luck.

    Unhandled Exception: System.TypeLoadException: Could not load type ' xx' from assembly 'Account.Plugin.Merged, Version=1.0.0.0, Culture=neutral, PublicKeyToken=48f4ec8800e56f69' because the method 'GrantAccess' has no implementation (no RVA).
       at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)
       at System.Reflection.RuntimeAssembly.GetExportedTypes()
       at Microsoft.Crm.Tools.Libraries.CrmAssemblyReader.RetrievePluginsFromAssembly(String path)
       at Microsoft.Crm.Tools.Libraries.CrmAssemblyReader.RetrievePluginsFromAssembly(String path)
       at Microsoft.Crm.Tools.Libraries.RegistrationHelper.RetrievePluginsFromAssembly(String pathToAssembly, String appPath)
       at Microsoft.Crm.Tools.AssemblyRegistration.PluginRegistrationViewModel.BtnLoadAssemblyClicked()

    Environments: CRM2016, On-premise, Update 0.1, VS 2015 - Update 2 and .net version 4.6.1

    Friday, May 27, 2016 3:33 PM

Answers

  • Solved.

    The merge worked using the ILMERGE GUI program but failed when envoking it in the post build through VS, so I checked the GUI log and noticed that several parameters were missing from the post build command such as /ndebug /copyattrs. After adding them the merged dll registered without any errors.
    Thursday, June 2, 2016 12:52 PM

All replies

  • I have the same exact problem but with VS2013. Think it happened after update (3 or 4).

    Any problem solvers on the block?

    Regards, Ragnar

    Monday, May 30, 2016 9:31 AM
  • Solved.

    The merge worked using the ILMERGE GUI program but failed when envoking it in the post build through VS, so I checked the GUI log and noticed that several parameters were missing from the post build command such as /ndebug /copyattrs. After adding them the merged dll registered without any errors.
    Thursday, June 2, 2016 12:52 PM
  • Solved.

    The merge worked using the ILMERGE GUI program but failed when envoking it in the post build through VS ...
    Just wondering if the merge was failing silently or were u getting any post build errors?

    blog: <a href="http://technologynotesforyou.wordpress.com">http://technologynotesforyou.wordpress.com</a> | skype: ali.net.pk

    Thursday, June 2, 2016 10:42 PM
  • The post build signaled no errors, it was not until we tried to register the assembly through the plugin registration tool that an error appeared.
    Friday, June 3, 2016 10:59 AM