Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Unanswered

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

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. 

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Redeploying a plug in after making changes cause System.BadImageFormatException Microsoft Dynamics 365 on-premise

    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

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,558 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,645 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans