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 :
Microsoft Dynamics CRM (Archived)

Error debugging plugin

(0) ShareShare
ReportReport
Posted on by 6

Hello All,

 while debugging the plugin i am getting the below error.

Unhandled Exception: System.InvalidOperationException: The plug-in type "sample plugin class" does not exist in the specified assembly.

how to resolve this issue.

*This post is locked for comments

I have the same question (0)
  • Alagunellaikumar Profile Picture
    6,212 on at

    Are you using any third party dll specified in plugin

  • Suggested answer
    Community Member Profile Picture
    on at

    can you post the code here , it might be missing some namespace

  • EmployeeOcta Profile Picture
    6 on at

    Hello All,

    In my case it's not using any third party dll.

    although a separate library project is there in the same one solution.

    I cannot build my class library project as it is throwing a compile time error as

    Cannot import the following key file: <filename>.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_ E2AEBF22AB52DD08.

    so does that affecting my plugin not to execute.

  • Community Member Profile Picture
    on at

    I guess these issue may related to the key you use to sign your plugin, did you use a old key or you create a new key for your plugin?

    You can check below link which seems has the same issue with you。

    social.microsoft.com/.../how-can-i-workaround-a-plugin-signing-bug-in-vs

  • Suggested answer
    shivaram Profile Picture
    3,315 on at

    Hi,

    Is this Team Project? Because if some one registered Plugin with new class file and then if you try to register this Plugin and in your solution you dont have respected class file then it will throw above error. If it is team project then pull latest code and build it then update your assembly.

    Hope it helps you

    Thanks.

  • EmployeeOcta Profile Picture
    6 on at

    Actually my system is being used by another user previously.

    after that my user been created on this machine .

    the previous user was able to run this plugin from his credentials. he was not getting such type of errors.

    when i have logged in to the system these strong key name issues have arises.

    my query.

    1. Does the user login also affects this.

    2. These keys are password protected so how to resolve them.

  • EmployeeOcta Profile Picture
    6 on at

    Hello All,

    I have deleted the old snk file and created a new one and then register the plugin in the MSCRM.

    But still in vain there is still the same error.

  • Alagunellaikumar Profile Picture
    6,212 on at

    In VS after build error came ,once you double click that error it goes to the error line. Could you please share screen shot of tha tcode

  • EmployeeOcta Profile Picture
    6 on at

    Hello Alagu,

    i have resolved the issue from visual studio compilation.

    and redeploy the plugin.

    But still same issue

    Unhandled Exception: System.InvalidOperationException: The plug-in type "sample plugin class" does not exist in the specified assembly.

    But in my plugin there is one class library project within one solution that i am directly using within this plugin.

    That class library project has some post build events associated with it.

    which is on building the solution do some work.

    I doub't on this if it could be the problem.

  • Suggested answer
    Alagunellaikumar Profile Picture
    6,212 on at

    Hi
    So in your plugin, you have two project is (1st)one is class library and (2nd)another one is main project. If it is correct then problem seems like you only register the 2nd dll in CRM using plugin registration tool. You havent register the 1st dll still yet.

    If my above statement is true then do the follow below
    CRM onpremise
    1st dll put in to GAC on CRM application server.

    CRM on line

    Merge the 1st and 2nd dll using merge tool and register in CRM using plugin registration tool

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans