?
Solved

Microsoft.SqlServer.Dts.Runtime vs. Microsoft.SQLServer.DTSRuntimeWrap... or, "How in the heck do I call an SSIS package from C#?"

Posted on 2010-09-01
4
Medium Priority
?
1,923 Views
Last Modified: 2013-11-30
I found the web page Running a Package Programmatically on the Local Computer that explains how to call an SSIS package from C#.  So far so good.

I need to reference Microsoft.SqlServer.Dts.Runtime in order to use the SSIS classes.  However, when I try to add a reference, under the .Net tab, I only see Microsoft.SQLServer.DTSRuntimeWrap, which is a little odd (case differences and no period, and what does WRAP mean???).

The "using" statement now is okay but the compiler still cannot find the SSIS classes (shown below):

Any idea what I'm supposed to reference to get these SSIS classes?

(Is there a specific SSIS library or for SQL Server 2005 was the library still called Dts?)
Error    21    The type or namespace name 'Package' could not be found (are you missing a using directive or an assembly reference?)
Error    22    The type or namespace name 'Application' could not be found (are you missing a using directive or an assembly reference?)
Error    23    The type or namespace name 'DTSExecResult' could not be found (are you missing a using directive or an assembly reference?)
Error    24    The type or namespace name 'Application' could not be found (are you missing a using directive or an assembly reference?)

Open in new window

0
Comment
Question by:ZuZuPetals
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 16

Expert Comment

by:carsRST
ID: 33582402
I believe you will need to install SQL Server components on your development machine.  After installed you should see the reference you need.
0
 
LVL 2

Author Comment

by:ZuZuPetals
ID: 33586976
I'm trying to update my server with additional software: In the advanced feature selection the Microsoft SQL Server 2005 Setup wizard says I already have the Client Components 1) Connectivity Components, Software Development Kit, and Legacy Components installed.

Plus, I already see lots of .Net components related to database in the "Add Reference" dialog box.

Are you saying I need to install the database engine itself on my development computer?
0
 
LVL 16

Expert Comment

by:carsRST
ID: 33587153
Sorry - just install SSIS then on your dev machine.  DLL should accompany.

0
 
LVL 2

Accepted Solution

by:
ZuZuPetals earned 0 total points
ID: 33587289
I figured it out by chance.  Without installing any additional stuff I tried referencing:

    Microsoft.SqlServer.ManagedDTS

because it looked like it might help.  :)   It apparently includes

    Microsoft.SqlServer.Dts.Runtime;

so my program compiles now.

Thanks for your help.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question