Could not load file or assembly 'Microsoft.SqlServer.ManagedDTS
-
Friday, June 03, 2011 10:41 AM
I have .Net application developed with VS2005 that calles SQL Server 2008 Integration Service package.
SSIS package is working fine if I click the file and excute it. SSIS package is working fine in development environment where SQL Server version is 2005.This is the error:
Could not load file or assembly 'Microsoft.SqlServer.ManagedDTS, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.ManagedDTS, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
This is what found at references of the VS2005 project: (is version 90 wrong reference for SQL Server 2008? Should I use VS2008?)
C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies\Microsoft.SQLServer.managedDTS.dll******************************************************************************************
This is the code:
Imports System.Data.SqlClient
Imports Microsoft.SqlServer.Dts.RuntimeDim pkgLocation As String
Dim pkg As New Package
Dim app As New Application
Dim pkgResults As DTSExecResultpkgLocation = Package
Try
If Storage = "Server" Then
If Trusted_Connection Then
pkg = app.LoadFromSqlServer(pkgLocation, DTS_Server, Nothing, Nothing, Nothing)
Else
pkg = app.LoadFromSqlServer(pkgLocation, DTS_Server, DTS_UserId, DTS_Password, Nothing)
End If
Else
pkg = app.LoadPackage(pkgLocation, Nothing)
End If
Catch ex As Exception
lblMsg.Text = "<b>Package load did not succeed, error:</b> " & ex.Message
pkg = Nothing
app = Nothing
Exit Sub
End TryTry
pkgResults = pkg.Execute()
Catch ex As Exception
lblMsg.Text = "<b>Package execution did not succeed, error:</b> " & ex.Message
End Try
Kenny_I
All Replies
-
Friday, June 03, 2011 2:31 PMModeratorYou probably deploy to a machine that has no SSIS engine of the same version installed.
Arthur My Blog

-
Friday, June 03, 2011 3:18 PM
Hi,
Refer Below thread where i suggest to put the library.
Failure in Life is failure to try...MCTS (SQL Server 2005) -
Monday, June 06, 2011 7:05 AM
You are right. There was SSIS engine version issue. Now I have SQL 2008 SSIS installed to machine and I also upgraged to VS2008 just for case.
When I try to Add Reference from VS, I don't find Microsoft.SQLServer.ManagedDTS for version 10.0.0.10. There is no such file in C:\Program Files\Microsoft SQL Server\100\DTS\binn. I find ManagedDTS only for SQL Server version 9.0.242.0.
Do I have to add some other reference instead? Do I have to modify my code?
Kenny_I -
Monday, June 06, 2011 11:11 AM
I added ManagedDTS from C:\Windows\Assembly. No more errors.
Kenny_I- Marked As Answer by Kenny_I Monday, June 06, 2011 11:11 AM
-
Friday, November 11, 2011 9:38 AMI have this error aswell. Do I have to have MSSQL SSIS on the machine installed or does this assembly come with .Net Framework?

