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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Could not load type 'Microsoft.Xrm.Sdk.Deployment.DeploymentServiceFault' from assembly 'Microsoft.Xrm.Sdk

(0) ShareShare
ReportReport
Posted on by 352

Good day to everyone. I would appreciate your advise about how to troublsehoot this issue:

Scenario:

  • SSIS project with target to SQL 2016 and created using VS 2017
  • C# Script component that needs to connect to Dynamics 365 v9 Online. Code target to .net 4.6.2. SDK references to the lastest dll versions available in nuget.
  • Script compiled with no errors.
  • Connection String tested in XRM Toolbox with no problems.

Problem:

The line of code in the Script:

  •  CrmServiceClient crmConn = new CrmServiceClient(connectionStringCRM);

Produces the following exception:

  • Could not load type 'Microsoft.Xrm.Sdk.Deployment.DeploymentServiceFault' from assembly 'Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

I tried the same approach and code several times in other projects with no problems so this time I am totally lost.

Thanks for any advice.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Abby Kong Profile Picture
    6 on at
    RE: Could not load type 'Microsoft.Xrm.Sdk.Deployment.DeploymentServiceFault' from assembly 'Microsoft.Xrm.Sdk

    Hi Xavier,

    The exception seems to be about Microsoft.Xrm.Sdk.Deployment, this package contains Microsoft.Xrm.Sdk.Deloyment.dll, can you try adding this NuGet package?

    www.nuget.org/.../Microsoft.CrmSdk.Deployment

    If you've got it working in XrmToolBox, you can open the folder where XrmToolBox is and check if that DLL is inside.

    Regards,
    Abby

  • Xavier Villafuerte Profile Picture
    352 on at
    RE: Could not load type 'Microsoft.Xrm.Sdk.Deployment.DeploymentServiceFault' from assembly 'Microsoft.Xrm.Sdk

    Thanks Abby. Microsoft.Xrm.Sdk.Deloyment.dll was already referenced in the project and it was obtained from nuget. The latest version of the dll was 9.0.2.12. Problem is still there.

  • Xavier Villafuerte Profile Picture
    352 on at
    RE: Could not load type 'Microsoft.Xrm.Sdk.Deployment.DeploymentServiceFault' from assembly 'Microsoft.Xrm.Sdk

    After a little bit of troubleshooting I found the cause for the problem. Because I was working on a SSIS package, I was using the approach documented in this link "blogs.msdn.microsoft.com/.../" to use the SDK dlls from a local path. It seems that the order of the dlls being called in the methods described in the article it is important because when the Xrm.Tooling.Connector.dll  reference was included prior to the Xrm.Sdk.dll, the connection worked like a charm even thought there was no any reference to the Microsoft.Xrm.Sdk.Deloyment.dll in the project. I hope this helps somebody in the future.

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
UllrSki Profile Picture

UllrSki 2

#1
Community Member Profile Picture

Community Member 2

#3
SC-08081331-0 Profile Picture

SC-08081331-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans