在 ssis 脚本组件中添加第三方 dll 引用 [英] Add third party dll reference in ssis script component

查看:34
本文介绍了在 ssis 脚本组件中添加第三方 dll 引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的脚本组件中添加了第三方引用(Json newtonsoft)dll(使用编辑脚本选项),但是当我运行包时,我收到一个错误

I have added third party reference (Json newtonsoft) dll in my script component (using edit script option), but when i run the package, I am getting an error

无法加载文件或程序集Newtonsoft.Json,版本=4.5.0.0,Culture=neutral,PublicKeyToken=30ad4fe6b2a6aeed"或其依赖项之一.系统找不到指定的文件.

Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.

有什么建议吗?

我将无法在 GAC 中添加 dll.

I will not be able to add the dll in GAC.

我使用的是 SQL Server 2008.

I am using SQL Server 2008.

推荐答案

通过运行",我假设从代理/命令行运行失败?它应该在 BIDS/SSDT 内工作.简短的回答是 DLL 必须在 GAC 中注册,或者您可以下载源代码并将该项目添加到脚本任务中,然后引用该项目.

By "Running," I assume running from agent/command-line is failing? It should work from within BIDS/SSDT. The short answer is the DLL must be registered with the GAC or you can download the source code and add that project into the script task and then reference said project.

查看项目,它应该是一个强签名的 DLL(基于 Dynamic.snk),因此能够添加到 GAC.哦,但是您声明您将无法将其添加到 GAC 中,这意味着这是权限问题,而不是能力问题.

Looking at the project, it should be a strongly signed DLL (based on presences of Dynamic.snk) and thus capable of being added to the GAC. Oh, but you state you will not be able to add it into the GAC, implying it's a permission not a capability issue.

如果是这种情况,要么使用源代码编译项目,要么使用 Web 服务包装器将其包围,然后引用该服务.

If that's the case, either compile the project in with the source or surround it with a web service wrapper and then reference the service.

我也看到了这个答案,看来您可以尝试动态加载引用.

I also saw this answer, seems you can try loading the references dynamically.

这篇关于在 ssis 脚本组件中添加第三方 dll 引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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