.Net Assembly / dll共享和部署 [英] .Net Assembly /dll Sharing and Deploying

查看:211
本文介绍了.Net Assembly / dll共享和部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有3个软件产品使用相同的.net dll(代码+旧版)。

所有这些使用3/4 dll的共同功能。



我想知道如何和在哪里部署这些dll。

这是最标准的方法。



S1]随着每个产品在其安装目录中 - 可能是最简单的方法。
(但如果在共享dll中发生任何更新,则必须对所有3个dll进行更新。)



S2]将其置于常见文件夹?系统GAC是否有帮助?

(将所有3放在GAC中,代码是shared.but,而不用担心版本控制?)



还有如何为这样的项目构建可部署的设置:



D1)在一个设置中打包所有的dll。每个设置都有自己的副本。

但假设有人安装软件A,那么对于软件B,共享文件已经存在于系统中。



D2]在一个单独的安装程序中部署公用文件,并使用each.try打包,以检测文件是否已经存在(如果没有部署)(这仍然无法帮助设置大小)

通用文件夹 - 应该是GAC或系统上的某个文件夹?
涉及复杂的设置,因为它需要检查不同共享文件的版本控制。



还假设如果要发布较新版本的软件,并且必须共存与旧版本..

如何维护多个版本的兼容性?

解决方案

我会去S1 +D1或S1+ ClickOnce;它可以实现简单的部署和版本控制,并且兼容ClickOnce部署,xcopy部署,MSI部署,Web等.GAC不适用于IMO。重新更新那么你会想单独测试/释放它们吗?我在构建服务器上配置了一个级联的构建,所以如果我更新一个库dll,它可以涓流并重建使用该DLL的所有内容,并向上(任何人说:是的,它检测和消除周期)。



常用文件夹方法与dll解决方案有关,所以本身就是一个真正的PITA。



GAC方法将工作,但是有很多不必要的努力,并且很难保存一些重复的dll。如果您需要部署到非管理员,这也是一个痛苦。


We have 3 software products which use the same .net dlls(code + legacy).
All these use common functionality present across 3/4 dlls.

i wanted to know how and where to deploy these dlls.
And which is the most standard way of doing this.

S1] Along with each product in its install dir -- probably easiest way to do. (but if any updates are to happen in the shared dll ..it has to be done for all 3 dlls.)

S2]Put it in common files folder?

S3] Does System GAC help in this?
(Put all 3 in GAC and the code is shared.but im worried about versioning?)

Also how to build a deployable setup for such projects:

D1]pack all dlls in one setup.each setup has its own copy.
but suppose if someone installs software A, then for software B the shared files are already present in the system.

D2]deploy common files in a separate setup and pack with each.try to detect if files are already present if yes dont deploy.(this still doesnt help setup size)
Common folder - should it be GAC or some folder on system? Involves complex setup as it will require check versioning of different shared files.

Also suppose if newer version of the software is to be released and it has to coexist with older version..
how to maintain compatabilty across multiple versions?

解决方案

I would go "S1"+"D1", or "S1"+ClickOnce; it makes for simple deployment and versioning, and is compatible with ClickOnce deployment, xcopy deployment, MSI deployment, web, etc. GAC is not appropriate IMO. Re updates; well, you'll want to test/release them individually, no? I have a cascading build configured on my build server, so if I update a library dll it trickles up and rebuilds everything that uses that dll, and upwards (before anyone says: yes, it detects and eliminates cycles).

The "common folder" approach has issues with dll resolution, so by itself is a real PITA.

The GAC approach would work, but is lots of unnecessary effort, and pretty painful to save a few duplicated dlls. It is also a pain if you need to deploy to a non-admin.

这篇关于.Net Assembly / dll共享和部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆