2

I am able to create package programmatically when it comes to ssis 2016 but when i try to create package programmatically i am getting below error.

could not load file or assembly 'microsoft.sqlserver.dtsruntimewrap, version=15.100.0.0, culture=neutral, publickeytoken=89845dcd8080cc91' or one of its dependencies. the system cannot find the file specified."

Created sample package and uploaded in below one drive location.

What i have observed is Microsoft.SqlServer.DTSRuntimeWrap for 2016 exists in

C:\Windows\Microsoft.NET\assembly\GAC_32\Microsoft.SqlServer.DTSRuntimeWrap\v4.0_13.0.0.0__89845dcd8080cc91

but ssis 2019 which is part of visual studio 2017 installation didn't install in GAC_32 but installed in

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\SSIS\150\Binn\Microsoft.SQLServer.DTSRuntimeWrap.dll

So installed it into gac using gacutil but now i am getting below error.

Microsoft.SqlServer.Dts.Runtime.DtsComException: 'An Integration Services class cannot be found. Make sure that Integration Services is correctly installed on the computer that is running the application. Also, make sure that the 64-bit version of Integration Services is installed if you are running a 64-bit application.

Update:

I understand that installing SSIS (MsDtsServer150) will solve the issue but thats really not needed for running ssis in 32 bit mode, since my app is running in 32 bit mode it should work without installing SSIS similar to import export wizard in SSMS.

Did a little bit more research, my app running SSIS 2017 in 32 bit mode was working even though SSIS is not installed because SSMS 17.* added needed dlls but SSMS 18.0 didnt install needed dll's and import export wizard is disabled in ssms 18.0, so my app is not working anymore.

I am able to run SSIS packages from visual studio, so my main question is, how is it that i am able to run it in visual studio without dlls in gac? how can i leverage the same thing?

Here is a detailed explanation:

We can install SSIS using Sql server * edition installer (ex: sql server developer edition) for SSIS 32 bit and 64 bit for any application that is calling DTSRuntime.Application() to work but if SSIS is not installed using sql server installer and instead just SSMS is installed it will still add 32 bit version to gac and also create "C:\Program Files (x86)\Microsoft SQL Server\140" folder with all needed dlls under DTS folder, with this we are able to run SSIS in 32 bit mode by calling DTSRuntime.Application() with project set to 32 bit mode.

Visual studio is creating versions of dll's ex: 15.100.0.0 for 15.0.0.0 and somehow its able to use the dll's within the same folder, to leverage the same i tried to create binding redirect in app.config as shown below but that didn't work

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
     <dependentAssembly>
        <assemblyIdentity name="Microsoft.SqlServer.ManagedDTS" publicKeyToken="89845dcd8080cc91" culture="neutral"/>
        <bindingRedirect oldVersion="11.0.0.0-15.0.0.0" newVersion="15.100.0.0"/>
        <codeBase version="15.100.0.0" href="C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\SSIS\150\Binn\Microsoft.SqlServer.ManagedDTS.dll"/>
      </dependentAssembly>
</assemblyBinding>

Even tried to change href to ".\Microsoft.SqlServer.ManagedDTS.dll" to point to assembly in bin but even that didnt help.

Hadi
  • 36,233
  • 13
  • 65
  • 124
sam
  • 345
  • 2
  • 4
  • 18

0 Answers0