GAC和Rebuilt DLL - 如何在开发和修改DLL时使用GAC [英] GAC and Rebuilt DLL's - How to use GAC when developing and modifying DLL

查看:99
本文介绍了GAC和Rebuilt DLL - 如何在开发和修改DLL时使用GAC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,想知道是否有人可以提供建议,指出我正确的方向:



我们目前在大多数网站上使用DLL文件,我们目前正在运营每个站点的开发和生产版本。我们在DLL中开发代码,然后在网站中引用它,并通过代码隐藏文件访问它。



当我们向DLL添加内容时(新功能为我们开发它,并使用TFS(Team Foundation Server)编译它,其中更改与其他开发人员更改合并。然后我们用新编译的那个替换该网站的DLL引用。



这意味着一些网站有不同版本的DLL,因为不需要这些功能,直到他们得到更新,并且只是不访问这些模块。



现在我们正在构建更多的网站,这些网站是我们蓝图的克隆(原始网站)。但显然我们不希望必须通过每个网站并在原始内容发生变化时添加/更新DLL。我正在搜索并看到了GAC(全局程序集缓存)的使用,但我认为这样的问题是所有网站都将使用此(开发和生产),因此错误修复不会是一个选项,并会导致两个版本网站,如果DLL有问题..



任何想法,对不起长篇故事。

解决方案

< blockquote> .Net中有一个称为发布者策略的术语。这将允许您允许放置新版本的DLL并允许用户使用该DLL。关于此主题的Msdn链接 - http://msdn.microsoft.com/en -us / library / dz32563a(v = vs.110).aspx [ ^ ]。


OK was wondering if someone can offer advice, point me in the right direction:

We currently use a DLL file across majority of our sites, we currently operate a development and production versions of each site. We develop code in our DLL and then reference that in the website, and access it through code behind files.

When we add something to the DLL (new feature for a website) we develop it, and compile it using TFS (Team Foundation Server) where the changes are merged with other developers changes. We then replace the DLL reference for that website, with the newly compiled one.

This means that some websites have different versions of the DLL as those features are not needed, until they get updated, and just don't access those modules.

Now we're building more websites that are "clones" of our blueprint (original site). But obviously we dont wish to have to go through each website and add / update the DLL when something changes on the orginal. I was searching and saw usage of the GAC (Global Assembly Cache), but obv problem i assume with this is that ALL website will use this (both dev and production) so bug fixing would not be an option, and would bring down both versions of sites, if problem with the DLL..

Any ideas, sorry for the long story.

解决方案

There is a term called publisher policy in .Net. This would allow you to allow put a new version of the dll and allow users to use the dll. Msdn link on this topic - http://msdn.microsoft.com/en-us/library/dz32563a(v=vs.110).aspx[^].


这篇关于GAC和Rebuilt DLL - 如何在开发和修改DLL时使用GAC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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