简体   繁体   English

为单个DLL部署许多DLL

[英]Deploying many DLLs for a single DLL

I have a solution with 50 projects. 我有50个项目的解决方案。

There are times when I just modify a single class file in a project and I just get a single new DLL. 有时候,我只修改项目中的单个类文件,而获得一个新的DLL。

But there are times when that single project is referencing other projects and those projects are referencing other projects so when I make a small change in one class in one project, I may have to deploye like 30 DLLs. 但是有时候,单个项目引用其他项目,而那些项目引用其他项目,因此当我在一个项目中对一个类进行少量更改时,我可能必须像部署30个DLL一样进行部署。

Why is that.. ? 这是为什么.. ? Why are so many new DLLs being created and why do I have to deploy those new DLLs? 为什么要创建这么多新的DLL?为什么我必须部署这些新的DLL?

It sounds like you have auto versioning on in addition to "specific version=true" set in your references. 听起来,除了在参考中设置的“特定版本= true”以外,您还具有自动版本控制功能。 You would probably want to manually version any of the dlls that don't change a whole lot, which would typically be your "framework" or "lib" dlls or what not. 您可能希望手动对所有不会改变太多的dll进行版本控制,这些dll通常是您的“框架”或“ lib” dll,或者没有。 Some shops choose to not compile those assemblies every time and to just put them in a "lib" directory or something, causing your primary assemblies which DO change often to build against the same version of your lib or framework dlls on every build. 一些商店选择不每次都编译这些程序集,而只是将它们放在“ lib”目录中,这样会使您经常更改的主程序集在每次构建时都针对相同版本的lib或Framework dll进行构建。

At my company, we put all of our framework assemblies on a public network share and leave them there until someone updates it. 在我公司,我们将所有框架程序集都放在一个公共网络共享上,并保留在那里,直到有人对其进行更新。 At that point, we make a new version, and place the new dll out on the share, alerting everyone that a new dll is there. 到那时,我们制作了一个新版本,并将新的dll放在共享上,提醒每个人都有新的dll。 Our reference share looks like the GAC, so we have \\\\\\\\lib.dll for all of our references. 我们的参考共享看起来像GAC,因此我们所有参考文件都有\\\\\\\\ lib.dll。 Some people check in the actual binaries into source control and reference them from there. 有些人将实际的二进制文件检入到源代码管理中并从那里引用它们。 What to do is really up to you and your team. 该做什么实际上取决于您和您的团队。

When you build a project you will find in the bin folder the dll and all the dll from the referenced projects. 生成项目时,您会在bin文件夹中找到dll和所引用项目中的所有dll。 That's the default behaviour because if you want to use your dll you probably need the referenced projects. 这是默认行为,因为如果要使用dll,则可能需要引用的项目。 You don't have necessarily to deploy all the dlls, you just need the changed ones. 您不必部署所有dll,只需要更改后的dll。

Bye, Marco 再见,马可

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM