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
1,823 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
  • 2
  • 2
4 Comments
 
LVL 16

Expert Comment

by:carsRST
Comment Utility
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
Comment Utility
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
Comment Utility
Sorry - just install SSIS then on your dev machine.  DLL should accompany.

0
 
LVL 2

Accepted Solution

by:
ZuZuPetals earned 0 total points
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now