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