Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't Compile SSIS Component; Missing Assembly in Visual Studio 2008

Tags:

There is no standard control flow task in SSIS to download a file over HTTP. I have tried some workarounds (Execute Process wget, Script Task HttpClientConnection), but have come to the conclusion that thew most robust and reusable way to perform this task is to create a custom component.

I have tried to do this by following Ray Gorski's guide, but have run into problem in my development environment.

The problem is that Visual Studio 2008 does not recognise the Microsoft.SqlServer.Dts namespace. It complains with the error message "The type or namespace name 'Dts' does not exist in namespace 'Microsoft.SqlServer' (are you missing an assembly reference?)".

I found advice on the MSDN forum that says you can add a reference by adding the assembly ManagedDTS.dll found in C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies\, but this directory does not exist on my system. I think this is because I am using SQL Server 2008 and not SQL Server 2005.

How do I fix this problem?

Here is my code, which is based on the sample in Ray Gorski's guide. There is no code here to actually accomplish my task, just an empty stub, which doesn't compile.

using System;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Runtime.Design;

namespace HTTPControlTask
{
    [DtsTask(
        Description = "HTTP",
        DisplayName = "HTTP",
        TaskContact = "Iain Elder",
        TaskType = "SSIS Help Task",
        RequiredProductLevel = DTSProductLevel.None)]
    public class HTTPControlTask : Task, IDTSComponentPersist
    {
    }
}

Here is a screenshot of the errors I see when I try to compile it:

enter image description here