Visual Studio的副本地方 [英] visual studio copy local

查看:252
本文介绍了Visual Studio的副本地方的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio中,当您添加的引用没有在性能标志被称为复制本地。有什么这实际上的确,当一些混乱。它似乎很容易理解,但我的问题是,当它复制本地。它是在引用添加还是将它复制的DLL时,本地项目建成。

In visual studio, when you add a reference there is a flag in the properties called, "Copy Local". There is some confusion about what this actually does and when. It seems easy to understand but my question is when does it copy local. Is it when the reference is added or does it copy the dll locally when the project is built.

这样做的原因的问题是,我们已经创建了refences一个DLL,它是完全相同的地方所有的开发者的本地工作站一个asp.net模板文件。我们认为,通过将该标志设置为复制本地,这将参考的位置,其中该dll生命,但是当我们使用的模板,参考被破坏,需要被重新添加

The reason for this question is we have created a asp.net template file that refences a dll that is on all of our devs local workstations in exactly the same place. We thought that by setting the flag to "Copy Local", this would reference the location where the dll lives but when we use the template, the reference is broken and needs to be re-added.

任何人都可以揭示出这个一些轻?

Can anyone shed some light on this?

推荐答案

复制本地属性确定引用是否复制到本地容器路径。在运行时,引用必须存在无论是在全局程序集缓存(GAC)或项目的输出路径。如果此属性设置为true,引用复制到项目的输出路径在运行时。

The Copy Local property determines whether a reference is copied to the local bin path. At run time, a reference must exist in either the Global Assembly Cache (GAC) or the output path of the project. If this property is set to true, the reference is copied to the output path of the project at run time.

所以这个属性其实并没有在方案中非常有用。

So this property is actually not useful in your scenario.

我无法提出比增加装配到GAC在每个开发者的工作站更好的解决方案:<一href="http://msdn.microsoft.com/en-us/library/yf1d93sz.aspx">http://msdn.microsoft.com/en-us/library/yf1d93sz.aspx

I'm unable to suggest a better solution than adding the assembly to the GAC in each developer workstation: http://msdn.microsoft.com/en-us/library/yf1d93sz.aspx

这篇关于Visual Studio的副本地方的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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