将程序集部署到构建机器上的 GAC 的最佳方法

发布于 2024-12-03 19:44:59 字数 117 浏览 6 评论 0原文

我们的单元测试期望在 GAC 中找到某个程序集。我想知道将程序集放入 TFS2010 自动构建的构建服务器上的 GAC 中的最佳方法是什么? 将构建后事件与 gacutil /i 一起使用是个好主意吗? 有更好的选择吗?

Our unit tests expect to find a certain assembly in the GAC. I am wondering what is the best way to put the assembly in the GAC on the build server that is part of TFS2010 automated build?
Is it a good idea to use a post build event with gacutil /i?
Are there better alternatives?

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

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

发布评论

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

评论(1

青春有你 2024-12-10 19:44:59

您的单元测试是否期望 GAC 中的 DLL 还是仅可用于 .NET 程序集探测?如果实际上是后者,为什么不使用 [DeploymentItem()] 属性并将程序集复制到测试文件夹,然后由 .NET 通过探测找到?另一种选择是在测试 DLL 的配置文件中使用 HintPath。

Do your unit tests expect the DLL in the GAC or just available to .NET assembly probing? If it's actually the latter, why don't you use [DeploymentItem()] attributes and have the assembly copied to the test folder and then found by .NET via probing? Another option would be to use a HintPath in your test DLL's config file.

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