如何向构建服务提供未部署的依赖项?

发布于 2024-12-12 08:45:39 字数 654 浏览 1 评论 0原文

前段时间我问了一个关于如何使用构建服务器上的依赖项集成应用程序,我得到了非常满意的答案。今天我面临着一个不同的案例。对于一个项目,我必须使用不可再分发依赖项(SSRS 的 RDL 对象模型)。这意味着这些程序集开箱即用,不是为了开发目的而部署的。但不知何故,我需要...

我的第一个猜测是在 GAC 中发布它们。很好,它成功了,构建服务器能够顺利编译项目。但后来我意识到它破坏了一些应用程序,例如报表服务器和报表生成器(可能它也会破坏 BIDS)。所以在 GAC 中发布绝对不是一个好的解决方案。

我的第二个猜测是检查源代码管理中的程序集。好吧,如果我只有 2 个程序集,大小约为 1MB,它就可以工作。但这里是23个程序集和29MB我必须签入,所以它肯定也不适合。

我对 MSBuild 目标了解不多,也许它可能是一个解决方案,但我真的不知道如何使用它。我一直在绞尽脑汁,现在我必须在破坏我的构建或破坏我的服务之间做出选择!

Some times ago I asked the question about how to integrate an application using dependencies on a build server and I had quite satisfying answers. Today I am facing a different case. For a project I have to use non-redistribuable depedencies (RDL object model for SSRS). It means that out-of-the-box, these assemblies are not made to be deployed for development purpose. But somehow, I need to...

My first guess was to publish them in the GAC. Fine, it worked and the build server was able to compile the project smoothly. But then I realised that it broke some applications like the Report Server and the Report Builder (probably it would also break BIDS). So publishing in the GAC is definitely not a decent solution.

My second guess was to check the assemblies in source control. Well, it could work if I had only 2 assemblies for an amount of about 1MB. But here it is 23 assemblies and 29MB I have to check in, so it is definitely not suitable either.

I don't know much about MSBuild targets and maybe it could be a solution but I really have no idea on how to use it. I have been scratching my head hard and now I have to chose between breaking my builds or breaking my services!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

乄_柒ぐ汐 2024-12-19 08:45:39

正如一些人在评论中所说,我们最终决定对程序集进行源代码控制。

但由于我们所处的环境有时需要经常移动,这意味着并不总是在办公室,并且需要远程工作,并且互联网连接偶尔有些不可靠,因此我们决定对是否对组件进行源控制设置一些严格的条件或者我们将它们部署在构建服务器和开发机器上。

如果满足所有这些条件,程序集将受到源代码控制:

  • 程序集/框架不可部署/可重新分发
  • 程序集/框架部署可能会干扰本地计算机服务稳定性
  • 项目集合上已部署程序集的总量不超过 100MB

As some people stated in comments we finally decided to source control the assemblies.

But as we are in an environment where we sometimes need to move a lot, which means not always in office, and need to work from distance with occasionally somewhat unreliable Internet connection, we decided to put some strict condition on whether we source control the assemblies or we deploy them on the build server and development machines.

Assemblies will be source controlled if all these criterias are met:

  • Assemblies/Framework is not deployable/redistribuable
  • Assemblies/Framework deployment may interfere with local machine services stability
  • Total amount of deployed assemblies on the project collection does not exceed 100MB
此生挚爱伱 2024-12-19 08:45:39

您可以尝试为这些程序集使用不同的存储库,并在构建作业期间进行签出/更新。

另外,如果您也想将其保留在主存储库中,您可以使用 svn:externals (http://svnbook.red-bean.com/en/1.0/ch07s03.html) 在更新时自动更新 DLL你的工作副本。

You could try using a different repository just for these assemblies, and do a checkout/update during the build job.

Also, if you want to keep it in the main repo as well, you could use svn:externals (http://svnbook.red-bean.com/en/1.0/ch07s03.html) to automatically update the DLLs when you update your working copy.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文