无法编译 SSIS 组件;Visual Studio 2008 中缺少程序集 [英] Can't Compile SSIS Component; Missing Assembly in Visual Studio 2008

查看:35
本文介绍了无法编译 SSIS 组件;Visual Studio 2008 中缺少程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SSIS 中没有通过 HTTP 下载文件的标准控制流任务.我尝试了一些解决方法(执行进程wget, 脚本任务HttpClientConnection),但得出的结论是,执行此任务的最可靠且可重用的方法是创建自定义组件.

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.

我尝试按照 Ray Gorski 的指南来做到这一点,但是在我的开发环境中遇到了问题.

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

问题是 Visual Studio 2008 无法识别 Microsoft.SqlServer.Dts 命名空间.它抱怨错误消息命名空间'Microsoft.SqlServer'中不存在类型或命名空间名称'Dts'(您是否缺少程序集引用?)".

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?)".

我找到了关于 MSDN 论坛 说您可以通过添加在 C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies 中找到的程序集 ManagedDTS.dll 添加引用\,但是这个目录在我的系统上不存在.我认为这是因为我使用的是 SQL Server 2008 而不是 SQL Server 2005.

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?

这是我的代码,它基于 Ray Gorski 指南中的示例.这里没有实际完成我的任务的代码,只是一个无法编译的空存根.

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:

推荐答案

64-bit 操作系统上,您可以找到文件 Microsoft.SQLServer.ManagedDTS.dll在以下路径中:

On 64-bit Operating System, you can find the file Microsoft.SQLServer.ManagedDTS.dll in the following path:

C:\Program Files (x86)\Microsoft SQL Server\100\SDK\Assemblies

32-bit操作系统上,您可以在以下路径中找到文件Microsoft.SQLServer.ManagedDTS.dll:

On 32-bit Operating System, you can find the file Microsoft.SQLServer.ManagedDTS.dll in the following path:

C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies

Microsoft SQL Server 下的文件夹90代表SQL Server 2005.

The folder 90 under Microsoft SQL Server represents SQL Server 2005.

Microsoft SQL Server 下的文件夹100代表SQL Server 2008.

The folder 100 under Microsoft SQL Server represents SQL Server 2008.

这篇关于无法编译 SSIS 组件;Visual Studio 2008 中缺少程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆