在哪里存储程序集的最佳实践?

发布于 2024-08-22 18:33:01 字数 473 浏览 4 评论 0原文

我正在寻找一些指导来存储程序集。这就是我们的源树目前的样子:

项目名称
后备箱
|--------src(源代码)
|--------lib(每个项目所需的程序集,例如 NUnit 框架、svn external)
|--------工具(每个项目所需的工具,例如 NUnit 可执行文件、svn 外部)
|--------ThirdPartyAssemblies(项目特定程序集,例如 log4net)

我们已将一些代码移至我们自己的库中,该库称为Utils.dll。

我现在想知道将该库(实际上是文件夹的好名字)以及我们将来编写的其他库放在哪里。

ThirdPartyAssemblies 似乎不是正确的位置(因为它不是来自第三方),lib 也不是,因为我们创建的每个项目都不需要这些程序集。

I'm looking for some guidance where to store assemblies. This is how our source tree looks like at the moment:

ProjectName
trunk
|--------src (source code)
|--------lib (assemblies needed by every project e.g. NUnit framework, svn external)
|--------tools (tools needed by every project e.g. NUnit executable, svn external)
|--------ThirdPartyAssemblies (project specific assemblies, e.g. log4net)

We've moved some code to a library of our own which is called Utils.dll.

I'm now wondering where to put this library (literally a good name for the folder) and furthermore other libraries that we write in the future.

ThirdPartyAssemblies does not seem like the right place (since it's not from a third party), nor does lib since the assemblies are not needed by every project we create.

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

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

发布评论

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

评论(2

尹雨沫 2024-08-29 18:33:01

好吧,如果需要的话,您当然可以创建一个“FirstPartyAssemblies”目录 - 但您确实需要首先“存储”这些程序集吗?它们来自不同的解决方案吗?你能不能只在同一个解决方案中使用多个项目,然后让 VS 适当地引入程序集?当然,您不必将所有项目都放在同一源层次结构中。

现在,在许多情况下,您想要存储程序集 - 并可能单独对其进行版本控制等 - 但如果您可以不这样做,它可能会让您的生活更轻松。但这实际上取决于您的情况。

Well you could certainly create a "FirstPartyAssemblies" directory if you needed to - but do you definitely need to "store" these assemblies in the first place? Do they come from a different solution? Can you not just use several projects in the same solution, and let VS pull the assemblies in appropriately? You don't have to have all the projects in the same source hierarchy, of course.

Now in many cases you will want to store the assembly - and potentially version it separately etc - but if you can get away without doing so, it'll possibly make your life easier. It really depends on your situation though.

半山落雨半山空 2024-08-29 18:33:01

我不会总是将项目放入解决方案中,除非您想采用开源方法。这可能会变得混乱。我总是使用公司的名称。就像[公司名称]Utils。这样,如果需要,您可以进一步分解它。就像[公司名称][域]实用程序或其他什么。

I wouldn't always put the project in the solution, unless you want to take an open-source approach. That could get messy. I always use the name of the company. Like [CompanyName]Utils. That way, you can further break it down if you need to. Like [CompanyName][Domain]Utils or whatever.

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