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)

Using CRM's assembly folder instead of GAC for DLLs not working

(0) ShareShare
ReportReport
Posted on by 90

Hi,

I'm trying to simplify the CRM 2011 deployment procedure on our dev machine a bit in order to be able to swap DLL files for debugging more easily.

We have our plugins registered in the CRM database using the plugin registration tool. They depend on custom DLLs that used to reside in the GAC, but now I've unínstalled those DLLs from the GAC and moved them to C:\Program Files\Microsoft Dynamics CRM\Server\bin\assembly. However, CRM is now unable to locate those files. During runtime, I'll get an error such as the following even though the mentioned DLL file is available in the exact same shape and form as before:

 

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Could not load file or assembly 'Netcompany.Crm.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d5b3a98e2fd3a4a1' or one of its dependencies. The system cannot find the file specified.Detail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
  <ErrorCode>-2147220956</ErrorCode>
  <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
    <KeyValuePairOfstringanyType>
      <d2p1:key>CallStack</d2p1:key>
      <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">   at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.Pipeline.Execute(PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.InternalMessageDispatcher.Execute(PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion)
   at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType)
   at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType)</d2p1:value>
    </KeyValuePairOfstringanyType>
  </ErrorDetails>
  <Message>Could not load file or assembly 'Netcompany.Crm.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d5b3a98e2fd3a4a1' or one of its dependencies. The system cannot find the file specified.</Message>
  <Timestamp>2012-07-17T08:07:10.2746185Z</Timestamp>
  <InnerFault i:nil="true" />
  <TraceText>

[Netcompany.Crm.Plugins2011: Netcompany.Crm.Plugins2011.PreIncidentHandler]
[530036e9-e441-e111-9229-00505695011f: Incident PreUpdate]


</TraceText>
</OrganizationServiceFault>

Why is this not working? Is CRM not configured to look for DLLs in C:\Program Files\Microsoft Dynamics CRM\Server\bin\assembly?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Luke A Simpson Profile Picture
    55 on at

    For referenced DLL's, you will need to either leave them in the GAC, or ILMerge them together with your plugin DLL as a post-build step.  Here is a link to a good blog stepping through using the tool.  blogs.msdn.com/.../how-to-reference-assemblies-from-plug-ins.aspx

  • Anders Nielsen Profile Picture
    90 on at

    I tried the ILMerge option first but gave up after a 10 hour futile struggle to get things working. I'm going to continue to use the GAC as everything else seems to cause too much trouble

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