Dynamics 365 – Use External DLLs in SSIS

By | February 13, 2018

Introduction:

No doubt SSIS is widely used tool for Migration and Integration in all areas, Dynamics 365 CRM is no exception. We have been using SSIS in our number of Dynamics 365 Migration and Integration project.

Recently, we received a business requirement where we have to use SSIS script component and need to connect to CRM and perform CRUD operation. So to connect to Dynamics CRM and perform the operations we need to add reference of below DLL in script component code.

Microsoft.Xrm.Sdk.dll

Microsoft.Crm.Sdk.Proxy.dll

Microsoft.Xrm.Sdk.Deployment.dll

Microsoft.IdentityModel.Clients.ActiveDirectory.dll

Microsoft.Xrm.Tooling.Connector.dll

But adding reference was not enough, further, we need to register all the above DLLs in GAC. But the client doesn’t want to register DLL in GAC because of some other issues. When we remove the DLL from GAC and execute the SSIS package then it started throwing following Error.ssis1

After some research and play around we found the solution to resolve this issue.

For this, first, we created one folder and copy all DLLs in that folder or give reference from project bin folder where we need to keep all DLLs and then add following code in script component.

If DLLs don’t exist on specified path and we execute package then it throws the error. So make sure you keep all DLLs at a specified path.

Also be sure you keep the sequence of load DLL as shown above. If the sequence of a line of code is different then it will throw the below error.

 ssis2

Conclusion:

The above method helps to use any External DLL in SSIS script component without registering it in GAC.

Dynamics CRM Maps

Leave a Reply

Your email address will not be published. Required fields are marked *