web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Redeploying a plug in after making changes cause System.BadImageFormatException Microsoft Dynamics 365 on-premise

(0) ShareShare
ReportReport
Posted on by 20

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. 

I have the same question (0)
  • Community Member Profile Picture
    on at

    Hi Blacksheep8,

    Maybe you can refer following thread:

    https://community.dynamics.com/365/sales/f/dynamics-365-for-sales-forum/299223/badimageformatexception-caused-by-the-early-bound-class-of-entities/862701 

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 179 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 110

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 61 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans