Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to debug with dll generated from plugin project build #37

Closed
efei001 opened this issue Apr 19, 2021 · 0 comments
Closed

Unable to debug with dll generated from plugin project build #37

efei001 opened this issue Apr 19, 2021 · 0 comments

Comments

@efei001
Copy link

efei001 commented Apr 19, 2021

When building the dll and trying to attach it to the debugger I get the following error:

Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'xxxx\bin\Debug\xxxx.Plugin.xxxx.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.
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()

@phuocle phuocle closed this as completed Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants