海关总署,还是不GAC? [英] To GAC, or not to GAC?

查看:268
本文介绍了海关总署,还是不GAC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个是写在ASP.NET 3.5,并使用Microsoft模式和放大器的数据访问层(DAL);做法库(以下简称为P与M. P),以完成其数据访问。我安装了P&安培; P和它驻留在我的GAC,因此,从逻辑上讲,我的DAL引用它在GAC 。因此,P&放大器,P库永远不会拉低到我的DAL的bin文件夹

I have a data access layer (DAL) that is written in ASP.NET 3.5 and uses the Microsoft patterns & practices libraries (hereafter referred to as P&P) in order to accomplish its data access. I installed P&P and it resides in my GAC, so, logically, my DAL references it in the GAC. Therefore, the P&P libraries are never pulled down to the bin folder of my DAL.

我至少有五(比这更均匀,但我懒得试算来全部)使用这个DAL项目不同的网站。而这所有的我,因为我是谁的作品在这些网站上唯一的开发工作就好了。

I use this DAL project in at least five (more than that even, but I'm too lazy to try to count them all) different websites. And this has all worked just fine for me because I'm the only developer who works on these websites.

不过,现在我有其他开发商谁是去工作,其中一些网站。

But, now I have other developers who are going to work on some of these websites.

的问题:如果开发人员拉DAL项目从我们的code库下降,也不会构建他们,如果他们没有在P&放大器;安装了P库

The problem: if a developer pulls the DAL project down from our code repository, it won't build for them if they don't have the P&P libraries installed.

我的问题:我应该期待开发商安装P&放,P库,或者我应该只转储他们在bin文件夹,并用它做

My question: should I expect the developers to install the P&P libraries, or should I just dump them in the bin folder and be done with it?

我知道,倾销他们进入bin文件夹可能是解决这个问题的最简单的方法,但我从来没有去过的bin文件夹的忠实粉丝,如果我可以参考他们在GAC代替。

I realize that dumping them into the bin folder is probably the easiest way to deal with the problem, but I've never been a big fan of the bin folder if I can reference them in the GAC instead.

推荐答案

这主要是文体preference为您的特定工作组。我倾向于包装网站以同样的方式我包的客户端应用程序:在bin文件夹中的所有所需的非.NET的框架二进制文件,并假设工作的任何机器,它们复制到/安装不会有什么海关总署。我在工作中的团队使我们的第三方组件签入源代码控制,二进制文件,并标记为基准的依赖,使每个人的工作在同一页上使用相同的二进制文件,我们从来没有担心开发商的机器之间安装的差异。

This is largely stylistic preference for your particular workgroup. I tend to favor packaging websites the same way I package client applications: with all required non-.NET-framework binary files in the bin folder, working with the assumption that any machine that they are copied to/installed to will not have anything in the GAC. My team at work keeps our third-party assemblies checked into source control as binary files and tagged as reference dependencies so that everyone works on the same page with the same binaries and we never have to worry about installation differences between developers' machines.

海关总署可能是一个方便节省空间的机制,但我preFER通过内联的文件提供的开发环境之间的一致性。

The GAC may be a convenient space-saving mechanism, but I prefer the consistency between developer environments provided by "inlining" the files.

这篇关于海关总署,还是不GAC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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