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)

Add other requirements for my plugin

(0) ShareShare
ReportReport
Posted on by 215

My dll workflow plugin requires the following file types:

.xml

.config

Multiple .DLLs

How can I add these references to my crm with the PluginRegistration?

*This post is locked for comments

I have the same question (0)
  • ehsan af Profile Picture
    215 on at

    I used ILmerge but I got into error on assembly plugin.

    Is there another way too add my references .

  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    Is this Online or On-Premise?

    If you get error messages, please post the messages.

  • Suggested answer
    ashlega Profile Picture
    34,477 on at

    Hi,

     for xml, you can include it into your dll as "embedded resource", and, then, load it from the resources:

    msdn.microsoft.com/.../bb398930.aspx

     for .config, it's more complicated since you can, of course, include it as "content" and load it from resources.. but it won't help you much. If there are any process-level configuration settings, they won't count anyway(plugins are dll-s, not processes). As for the settings such as WCF bindings etc, you'll probably have to use code to configure those.

     As for the dlls.. If it's on-prem, you can put those dlls on the server (or you might, rather, want to register them in GAC)

     If it's online, ILMerge is the only option. Not sure I'd be able to help with the errors, though.

  • ehsan af Profile Picture
    215 on at

    My crm is On-Premise.

    i put all file to <MS CRM>\server\bin\assembly folder

    when workflow runs, this error is displayed :

    Unhandled Exception: Microsoft.Crm.CrmException: Unexpected exception from plug-in (Execute): CrmSmsSolutionWorkflow.SendSMS: System.IO.FileLoadException: Could not load file or assembly 'Citydi.Dandelion.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

      at Microsoft.Crm.Sandbox.SandboxCodeUnit.Execute(IExecutionContext context)

      at Microsoft.Crm.Workflow.Services.ProxyCustomActivity.Execute(CodeActivityContext executionContext)

  • ehsan af Profile Picture
    215 on at

    isolation mode is : sandbox

    and my dll register in Database

  • ehsan af Profile Picture
    215 on at

    I solved the previous problem with insert public token for all my dll files

    and new error is :

    Microsoft.Crm.CrmException: Failed to get priv user group information. k = 4130e443-57d8-4d38-9b06-bdc15157a198 privUserGroupId: a6a37b1b-797a-434b-9268-69fa36e38ca5, localSystemAdGuid: d91c44b9-4b9d-4f7b-a78e-2f6de05d3ce4, Exception: System.Runtime.InteropServices.COMException (0x800706BE): The remote procedure call failed. (Exception from HRESULT: 0x800706BE)

      at Microsoft.Crm.Tools.ActiveDsWrapper.NameTranslateClass.Init(Int32 lnSetType, String bstrADsPath)

      at Microsoft.Crm.ADNameUtility.Rfc1779NameFromGuid(Guid guid)

      at Microsoft.Crm.SecurityUtils.BuildLdapPath(Guid adGuid)

      at Microsoft.Crm.SecurityUtils.CheckMembership(Guid principalId, Guid groupId)

      at Microsoft.Crm.Caching.OrganizationSettingsCacheLoader.LoadCacheData(Guid key, ExecutionContext context). ---> System.Runtime.InteropServices.COMException: The remote procedure call failed. (Exception from HRESULT: 0x800706BE)

      at Microsoft.Crm.Tools.ActiveDsWrapper.NameTranslateClass.Init(Int32 lnSetType, String bstrADsPath)

      at Microsoft.Crm.ADNameUtility.Rfc1779NameFromGuid(Guid guid)

      at Microsoft.Crm.SecurityUtils.BuildLdapPath(Guid adGuid)

      at Microsoft.Crm.SecurityUtils.CheckMembership(Guid principalId, Guid groupId)

      at Microsoft.Crm.Caching.OrganizationSettingsCacheLoader.LoadCacheData(Guid key, ExecutionContext context)

      --- End of inner exception stack trace ---

      at Microsoft.Crm.Caching.OrganizationSettingsCacheLoader.LoadCacheData(Guid key, ExecutionContext context)

      at Microsoft.Crm.Caching.ObjectModelCacheLoader`2.LoadCacheData(TKey key, IOrganizationContext context)

      at Microsoft.Crm.Caching.CrmMultiOrgCacheBase`2.CreateEntry(TKey key, IOrganizationContext context)

      at Microsoft.Crm.Caching.CrmMultiOrgCacheBase`2.LookupEntry(TKey key, IOrganizationContext context)

      at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetOrganizationSystemUser(Guid org, IOrganizationContext context)

      at Microsoft.Crm.Caching.StepDescriptionLoader.LoadCacheData(Guid key, ExecutionContext context)

      at Microsoft.Crm.Caching.ObjectModelCacheLoader`2.LoadCacheData(TKey key, IOrganizationContext context)

      at Microsoft.Crm.Caching.CrmMultiOrgCacheBase`2.CreateEntry(TKey key, IOrganizationContext context)

      at Microsoft.Crm.Caching.CrmMultiOrgCacheBase`2.LookupEntry(TKey key, IOrganizationContext context)

      at Microsoft.Crm.Asynchronous.EventOperation.GetPluginTypeId(AsyncExecutionContext context)

      at Microsoft.Crm.Asynchronous.EventOperation.GetPluginAssembly(AsyncExecutionContext context)

      at Microsoft.Crm.Asynchronous.EventOperation.InternalExecute(AsyncEvent asyncEvent)

      at Microsoft.Crm.Asynchronous.AsyncEventHandlerCommand`1.Execute(IAsyncEvent asyncEvent)

      at Microsoft.Crm.Asynchronous.AsyncEventExecutionManager`2.ExecuteCommand(IAsyncEventHandlerFactory handlerFactory)

      at Microsoft.Crm.Asynchronous.AsyncEventExecutionManager`2.ExecuteHandler(IAsyncEventHandlerFactory handlerFactory)

      at Microsoft.Crm.Asynchronous.PoolHandler.ProcessAsyncEvent(IAsyncEventExecutionManager asyncEventExecutionManager)

  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    Try restarting the CRM Async Services on the Server, as well as the WWW Publishing Service.

    That might help.

  • ehsan af Profile Picture
    215 on at

    I reset the service but again it shows the previous Error :

    Unhandled Exception: Microsoft.Crm.CrmException: Unexpected exception from plug-in (Execute): CrmSmsSolutionWorkflow.SendSMS: System.IO.FileNotFoundException: Could not load file or assembly 'Citydi.Dandelion.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adf944d3f9f560f6' or one of its dependencies. The system cannot find the file specified.

      at Microsoft.Crm.Sandbox.SandboxCodeUnit.Execute(IExecutionContext context)

      at Microsoft.Crm.Workflow.Services.ProxyCustomActivity.Execute(CodeActivityContext executionContext)

  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    Try installing your assembly in the GAC (using gacutil /i)and see if that works for you

  • ehsan af Profile Picture
    215 on at

    i added my refrences dll files by command prompt ( gacutil.exe -i C:\New\myrefrences.dll )

    and try to register my plugin in sandbox isolation mode and GAC location

    i get this error :

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Unable to load plug-in assembly.
    Detail: <OrganizationServiceFault xmlns="schemas.microsoft.com/.../Contracts" xmlns:i="www.w3.org/.../XMLSchema-instance">
    <ErrorCode>-2147204719</ErrorCode>
    <ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic" />
    <Message>Unable to load plug-in assembly.</Message>
    <Timestamp>2017-09-03T08:19:37.9459994Z</Timestamp>
    <InnerFault>
    <ErrorCode>-2147204719</ErrorCode>
    <ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic" />
    <Message>Unable to load plug-in assembly.</Message>
    <Timestamp>2017-09-03T08:19:37.9459994Z</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()

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