将物理文件夹添加到引用库的解决方案中
我有一个包含多个项目的解决方案,这些项目都引用一组通用的 Microsoft.Practices 库。现在,这些库位于其中一个项目的 bin 文件夹中,并分组在名为“DLL”的解决方案文件夹下,我一点也不喜欢这样。 bin 文件夹应保留为输出文件夹,并且项目之间共享的依赖项不应隐藏在一个项目的“输出”中。
理想情况下,我只想向我的解决方案添加一个物理文件夹,将这些库移动到该文件夹,然后更新所有项目引用以指向该文件夹,但我无法向解决方案添加物理文件夹。几乎可以接受的解决方案是创建一个没有源文件的新项目,并将库移动到为该项目创建的物理文件夹中,等等。
对于这样的场景,有哪些公认的良好做法?
I have a solution with several projects that all reference a common set of Microsoft.Practices libraries. Right now, these libraries are in the bin folder of one of the projects, and grouped under a solution folder called 'DLLs', and I don't like this at all. A bin folder should remain an output folder, and dependencies shared among projects should not be hidden in the 'output' of one project.
I would ideally just like to add a physical folder to my solution, move these libraries to that folder, and update all project references to point to that folder, but I can't add a physical folder to a solution. An almost acceptable solution is to create a new project, with no source files, and move the libraries into the physical folder created for that project, and so on.
What are accepted good practices for scenarios like this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我们的项目/解决方案结构如下所示:
我们在多个项目中使用的公共库位于此处
这对我们来说非常有用。在我看来,解决方案中不需要包含程序集。如果您需要解决方案范围的库文件夹,请将其放入公司名称文件夹中。这只是文件夹的逻辑结构,没有别的;-)
Our project/solution structure look like this:
Our common libraries, which are used in several projects lies here
That works great for us. There is no need to have the assemblies in the solution, in my point of view. If you need a solution wide library folder, so put this into the companyname folder. It's only a logical structure of folders, nothing else ;-)
典型的方法是在项目目录的根目录中创建一个 Lib 目录并将 dll 放置在那里。无需将其作为解决方案的一部分。但是,如果您确实希望将其添加到解决方案中,则可以随时创建一个解决方案文件夹并将它们放入其中(右键单击解决方案,展开“添加”菜单,选择“新建解决方案文件夹”)。
The typical way is to create a Lib directory in the root of your projects directory and place your dlls there. No need to have it as part of your solution. But if you do want it in your solution, you can always create a solution folder and place them in there (right-click on the solution, expand the Add menu, select "New Solution Folder").
我添加了解决方案文件夹,或将库放置在已经存在的“通用”项目中。
I've added solution folders, or placed the libraries in an already existing "common"-project.