混合SSIS / DLL解决方案自动部署 [英] Automated deployment of mixed SSIS / DLL solution

查看:325
本文介绍了混合SSIS / DLL解决方案自动部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我们使用SSIS / C#的解决方案的发展。 SSIS包(其中包括)有一个使用的类库开发逻辑的脚本任务。此功能需要从SSIS包保持独立。

We currently have a solution developed using SSIS / C#. The SSIS package (amongst other things) has a script task that uses logic developed in the class libraries. This functionality needs to remain separate from the SSIS package.

由于我们使用的SSIS包我明白,编译的DLL的需要被部署到GAC,然后从脚本任务引用。然而,这是为我们创建部署问题。

Because we are using an SSIS package I understand that the compiled DLL's need to be deployed to the GAC, and then referenced from the script task. However this is creating a deployment problem for us.

我们的自动化部署工具(正确)自动递增的DLL的版本号,然后再发布到GAC。然而,这打破了SSIS包,因为它会尝试访问该DLL的基础上,他们都发布到开发计算机作为GAC的版本号。

Our automated deployment tool (rightly) automatically increments the version numbers of the DLL's, which are then published to the GAC. However this breaks the SSIS package, as it will try and access the DLL's based on the version number they were published to the development machine GAC as.

我们必须解决这个问题的唯一的解决办法是让编译的DLL的,manualy修改SSIS包脚本任务,然后发布该数据包。

The only solution we have to this is to get the compiled DLL's, manualy modify the SSIS package script task and then publish the package.

好像必须有这样做的更好的方法 - 有没有人遇到过这个问题,并想出一个更好的解决办法?或者是有我们需要改变(除了省去了DLL的需要)一些基本的东西在我们的方法?

It seems like there must be a better way of doing this - has anyone encountered this problem and come up with a better solution? Or is there something fundamental in our approach we need to change (beyond eliminating the need for the DLL's)?

谢谢!

推荐答案

好了,大量的研究后,我从来没有真正来到了这一个满意的解决方案。到底最接近我能得到是一个解决方案,我动态加载我的引用:

Well, after much research I never really came up with a satisfactory solution for this. In the end the closest I could get was a solution where I loaded my references dynamically:

    Dim rsAssembly As Assembly = Assembly.LoadFile("path from config file")
    Dim rsType As Type = rsAssembly.GetType("class name from config file")
    Dim obj As Object = Activator.CreateInstance(rsType)

这让我创造我所需要的对象(虽然值得注意的是,任何其他相关的引用也需要动态地加载所或GAC的一部分,但至少不会对版本号的依赖关系)。

This allowed me to create the object I required (although worth noting that any other dependant references also need to by dynamically load or part of the GAC, although at least without the dependancy on the version number).

在这里发布为未来的求职者,但如果有人想出了更好的东西我仍然会很好奇,想知道你是怎么解决它 - 张贴在这里,我将认可您的答案:)

Posted here for future seekers, but if anyone comes up with something better I would still be very curious to know how you resolved it - post here and I will credit you with the answer :)

这篇关于混合SSIS / DLL解决方案自动部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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