问题描述
我正在使用w7、64位和vs.net 2010.
I am using w7, 64bit and vs.net 2010.
我要在添加引用"对话框中添加对组件的引用.该组件是第3方dll.
I am adding a reference to a component that is within my 'add references' dialog box. The component is a 3rd party dll.
从历史上看,在w7 32bit上,它将在我的web.config中(在Assemblys标记内)添加引用此dll的行,并且不会将dll复制到bin目录.
Historically, on w7 32bit it would add a line in my web.config (within the assemblies tag) referencing this dll and it wouldn't copy the dll to the bin directory.
但是,在64位w7上,dll被复制到bin目录,而web.config根本没有更新.
However, on 64bit w7 the dll is copied to the bin directory and the web.config is not updated at all.
为什么将dll复制到bin目录?谢谢
Why is the dll being copied to the bin directory?thanks
解决方案:(已更新)这些帖子为我提供了所需的线索.
Solution: (Updated)These posts gave me the clues I needed.
如果您的系统在GAC中找不到dll,VS.NET会将dll复制到bin目录. GAC中的程序集(在您的工作站上注册),可以通过查看C:\ Windows \ Assembly目录来找到.
vs.net添加引用对话框"中列出的组件可能不在gac中.由于该组件已在添加引用"对话框中列出,并不意味着该组件已在您的本地工作站上注册.我导航到组件目录,然后将所需的dll拖到C:\ Windows \ Assembly目录中.我关闭并重新打开vs.net,浏览到相同的文件,然后单击添加引用.
**这将程序集引用添加到我的web.config中(并且它也没有将dll复制到我的网站bin目录中)****
**This added the assembly reference to my web.config (and it also didn’t copy the dll to my web site bin directory)****
推荐答案
它将副本复制到bin目录,以便可执行文件可以找到它.除非在GAC中安装了dll,否则它将无法找到它.
It gets copies to the bin directory so that the executable can find it. It won't find it otherwise, unless the dll is installed in the GAC.
这篇关于Visual Studio 2010“添加参考" dll复制到bin目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!