在不同的 ASP.NET 项目之间共享 bin 文件夹
有谁知道多个项目是否可以引用/共享同一个 bin 文件夹?谢谢。
Does anyone know if it's possible for multiple projects to reference/share the same bin folder? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可能需要考虑一下您实际上想在这里做什么。假设您设法完成此设置,最终得到三个项目,所有项目都在一个位置引用程序集 B。
您必须对程序集 B 进行“重大”更新才能满足其中一个项目的要求,但您没有时间更新其他两个项目来适应。在这种情况下你会怎么做?
You may want to think about what you actually want to do here. Say you manage to set this up and you wind up with three projects, all referencing assembly B in one place.
You have to make a 'breaking' update to assembly B to satisfy a requirement for one of those projects, but you don't have time to update the other two to suit. What do you do in this situation?
我的项目根目录中通常有一个 Library 文件夹,然后通过“添加资源”下的浏览选项卡将解决方案中的所有项目链接到同一个 dll。
I normally have a Library folder in my project root then link all of the projects in the solution to the same dll via the Browse tab under 'Add Resource'.
只要所有 DLL 都位于同一个“bin”文件夹中,就可以从同一个 IIS 应用程序中运行多个应用程序。对于 IIS,这看起来就像一个应用程序,因为有一个“bin”文件夹。
不过,除非您有充分的理由,否则可能不应该这样做。您会失去进程隔离并使部署变得更加困难。
As long as all of the DLLs are in the same "bin" folder, multiple apps can be run from within the same IIS application. To IIS, this just looks like a single application because there is a single "bin" folder.
This probably shouldn't be done unless you have a good reason, though. You lose process isolation and make the deployments harder.