Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Suggested answer

Dynamics 365 Plugin Registration

Posted on by Microsoft Employee

Hi All,

I have an issue with registering a custom workflow assembly file using plugin registration tool. I have created this assembly referencing an external dll ITextSharp.dll, assembly build is going as expected, I used ILMerge to get the merged dll and when I try to register the merged dll I get the below message

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'ABC.CRM.Workflows, Version=1.0.0.0, Culture=neutral, PublicKeyToken=77166a3fe764c9f6' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Microsoft.Crm.Tools.Libraries.CrmAssemblyReader.LoadAssembly(String path)
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()
Inner Exception: System.Security.SecurityException: Strong name validation failed. (Exception from HRESULT: 0x8013141A)

Project default framework: .NET 4.5.2

As I used ILMerge CopyLocal property of the external library is set to True and the rest is set to False

Been stuck with this for about a week now. I'd really appreciate any advise/suggestions.

Thanks,

Vinod

  • Suggested answer
    RE: Dynamics 365 Plugin Registration

    Please refer to the GIT HUB Article :

    github.com/.../58

    Please check if you are performing the suggestion as below :

    Sorry, but that won't work. ILMerge works by taking each member of the input assemblies and reparents them so that they belong to the merged assembly. For instance, if there is a type T in an assembly A, then it's fully-qualified name is "[A]T" (using the format that you'll see if you use ildasm to open an assembly). If you use ILMerge to merge assembly A into the merged assembly M, then the type T has the fully-qualified name "[M]T". It is a totally distinct type (to .NET) from [A]T.

    Hope that is clear. Let me know if you need any more help.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans