none
Could not load file or assembly 'Microsoft.SqlServer.ManagedDTS

    Question

  • 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.Runtime

          Dim pkgLocation As String
            Dim pkg As New Package
            Dim app As New Application
            Dim pkgResults As DTSExecResult

            pkgLocation = 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 Try

            Try
                pkgResults = pkg.Execute()
            Catch ex As Exception
                lblMsg.Text = "<b>Package execution did not succeed, error:</b> " & ex.Message
            End Try


    Kenny_I
    Friday, June 03, 2011 10:41 AM

Answers

All replies