Kamel Jtita
Kamel Jtita

Reputation: 21

DTS.runtime.Application Error With Visual Studio 2019

Visual Studio 2019 Enterprise v16.11.15 SS Integration services 3.16 I try to Load my DTSX Package as File with Framework C# class. I add reference to Microsoft.SqlServer.Dts.Runtime to my project with browse dll within : C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\PublicAssemblies\SSIS\150 When running reach the instruction : Microsoft.SqlServer.Dts.Runtime.Application a = new Microsoft.SqlServer.Dts.Runtime.Application(); I get the following output Error : System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.SqlServer.DTSRuntimeWrap, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The specified file can not be found.'

the same Script.Main is working perfect when i downgrade the DTS.Runtime reference to the ManagedDTS version 14 or older. The problem that the TargetServerVersion of SQL Server 2019 is only able in Version 15.

If someone has a solution i would be grateful.

Upvotes: 1

Views: 985

Answers (1)

Kamel Jtita
Kamel Jtita

Reputation: 21

Finally i find solution to workaround this bug ; i have changed the visual studio project Template from Console App (.Net Framework ) to SSIS Project and then i put my code on Task Script Component. Naturally i add reference to new ManagedDTS dll for VS 2019 to my project . Now solution is running well and i can call the function App.SaveAndUpdateVersionToXml sucessfully to upgrade automatically all packages DTSX by Framework .Net Script. I share with you this blog which very supported me to make solution. https://blog.bartekr.net/2018/02/28/upgrading-ssis-projects-part-iii/ Thank you for you all

Upvotes: 1

Related Questions