I have plugin that was originally build using 2017 and I am currently using 2019 to make changes to the code. The changes consist of adding more option-set to which was present in CRM but not in the plugin. And making true or false statement which copies over a option set field's Value to another option set field. I cleaned the project, rebuild it and used the Plugin Registering Tool to update the plugin. Since I have done so I am getting "Sdk.Sync.execute Error: System.BadImageFormatException: Microsoft Dynamics CRM has experienced an error" when I try to use the function in CRM. I also get "Sdk.Sync.execute Error: System.IO.DirectoryNotFoundException: Microsoft Dynamics CRM has experienced an error. " when I am using another function within CRM
Things I have tried so far:
- The setting of Project for Platform target was set to Any CPU when I first redeployed it and I have tried redeploying it with x86 as well but it doesn't seem to be working
- I have commented out the changes I made and redeployed it and it is still causing same error.
- I had copy of old code so used 2017 visual studio to redeploy the unchanged plugin but still same error
I am not sure what to do. Any suggestion?
I have copy of this plugin in another environment, would just zipping the into solution and bring it over work to the environment I am working on be fine? I would ideally like to get to the bottom of why I am seeing this error. Any help will be greatly appreciated.