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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

how helper class dll reference use in plugin

(0) ShareShare
ReportReport
Posted on by 1,562

Hello Sir,

I have a helper class dll and i want to use its reference in plugin.

so, on plugin i can avoid to write same code again and again.

how can i do this please guide me.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Aileen Gusni Profile Picture
    44,524 on at

    Tin Lat,

    The recommended one is using ILMerge to merge them together as one file.

    Thanks.

  • Suggested answer
    Tin Profile Picture
    1,562 on at

    Hello Aileen,

    After the merge dll,when i am going to register dll from plugin register toll.I am finding error.Please have a look and let me know how i can resolve it.

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Plug-in assembly fullnames must be unique (ignoring the version build and revision number).

    Detail: <OrganizationServiceFault xmlns="schemas.microsoft.com/.../Contracts&quot; xmlns:i="www.w3.org/.../XMLSchema-instance&quot;>

     <ErrorCode>-2147204741</ErrorCode>

     <ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic&quot; />

     <Message>Plug-in assembly fullnames must be unique (ignoring the version build and revision number).</Message>

     <Timestamp>2015-09-28T07:55:50.9281338Z</Timestamp>

     <InnerFault>

       <ErrorCode>-2147204741</ErrorCode>

       <ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic&quot; />

       <Message>Plug-in assembly fullnames must be unique (ignoring the version build and revision number).</Message>

       <Timestamp>2015-09-28T07:55:50.9281338Z</Timestamp>

       <InnerFault i:nil="true" />

       <TraceText i:nil="true" />

     </InnerFault>

     <TraceText i:nil="true" />

    </OrganizationServiceFault>

    Server stack trace:

      at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)

      at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)

      at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)

      at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]:

      at Microsoft.Crm.Tools.Libraries.RegistrationHelper.RegisterAssembly(CrmOrganization org, String pathToAssembly, CrmPluginAssembly assembly)

      at Microsoft.Crm.Tools.AssemblyRegistration.PluginRegistrationViewModel.btnregisterClick()

  • Mahendar Pal Profile Picture
    45,095 on at

    Hi,

    It seems you are trying to update plugin assembly which is registered with another name first, if that is the case, first un-register your plugin assembly and then re-register it again.

  • Suggested answer
    Tin Profile Picture
    1,562 on at

    ok,I am un-register  plugin assembly and then re-register it again.but still find given issue.

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Plug-in assembly does not contain the required types or assembly content cannot be updated.

    Detail: <OrganizationServiceFault xmlns="schemas.microsoft.com/.../Contracts&quot; xmlns:i="www.w3.org/.../XMLSchema-instance&quot;>

     <ErrorCode>-2147204725</ErrorCode>

     <ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic&quot; />

     <Message>Plug-in assembly does not contain the required types or assembly content cannot be updated.</Message>

     <Timestamp>2015-09-28T09:12:11.3661102Z</Timestamp>

     <InnerFault>

       <ErrorCode>-2147204725</ErrorCode>

       <ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic&quot; />

       <Message>Plug-in assembly does not contain the required types or assembly content cannot be updated.</Message>

       <Timestamp>2015-09-28T09:12:11.3661102Z</Timestamp>

       <InnerFault i:nil="true" />

       <TraceText i:nil="true" />

     </InnerFault>

     <TraceText i:nil="true" />

    </OrganizationServiceFault>

    Server stack trace:

      at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)

      at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)

      at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)

      at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]:

      at Microsoft.Crm.Tools.Libraries.RegistrationHelper.RegisterPlugin(CrmOrganization org, CrmPlugin plugin)

      at Microsoft.Crm.Tools.AssemblyRegistration.PluginRegistrationViewModel.btnregisterClick()

  • Rajkumar Rajaraman Profile Picture
    on at

    Tin,

    Refer the following links:

    community.dynamics.com/.../plug-in-assembly-does-not-contain-the-required-types-or-assembly-content-cannot-be-updated

    gonzaloruizcrm.blogspot.in/.../crm-2011-plug-in-assembly-does-not.html

    Hope this helps.

    Regards,

    R.Rajkumar

    "Please mark my answer as verified if you found it helpful"

  • Mahendar Pal Profile Picture
    45,095 on at

    It seems still you are trying to update only "Plug-in assembly does not contain the required types or assembly content cannot be updated."

    Try below steps  

    > Un-Register your plugin first

    > Disconnect to plugin registration tool

    > Do iisreset in your CRM server

    > Register your plugin

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans