1

In one of my of SSIS package I am using Script Transformation Component to create some master records in Dynamics CRM online. When I run the script using console application it run perfectly. But when I use same source code in SSIS Script Transformation Component I am facing below exception.

enter image description here

I've verified all of the references are associated already but still I am facing this exception. Expert's swift response is appreciated

Mohsin A.
  • 153
  • 2
  • 18
  • Why is this labeled c#? A reference starting with Microsoft is a COM object (not Net). A c# application will not run all dlls. It will only run managed dll added as a reference. Non managed code must be executed from DllImport. And old Dll from Win95 will not run from DllImport and you would need a c++ wrapper. – jdweng Feb 23 '20 at 20:35

2 Answers2

0

Difference between your console app and SSIS Script component is the following.
The Console App runs from some folder where custom assembly resides. Your Script Component is executed under SSIS Service, which is launched from MS SQL binaries. To use custom assembly, you should either put it in GAC, Here is an Microsoft help article with workflow.
Alternative approach - provide your own AssemblyResolver in Script task code (SO article with code sample).

Ferdipux
  • 5,116
  • 1
  • 19
  • 33
0

You cannot refer Dynamics core sdk dll directly in SSIS script component..these sdk files need to be available on server machine gac