向项目添加非 GAC 参考 [英] Add Non-GAC reference to project

查看:37
本文介绍了向项目添加非 GAC 参考的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次我在我的 GAC 中的 Visual Studio 2008 中添加对 Web 项目的引用时,它都会将该引用添加为 GAC 引用,并且不会将该文件复制到我的 bin 目录中.但出于部署目的,我想将引用添加为非 GAC 引用,以便将 dll 添加到我的 bin 目录中.我曾尝试使用浏览按钮选择引用而不是从列表窗口中选择,但这也添加了 GAC 引用.

Every time I add a reference to a web project in visual studio 2008 that is in my GAC, it adds the reference as a GAC reference and doesn't copy the file to my bin directory. But for deployment purposes, I would like to add the reference as a non-GAC reference so it adds the dll to my bin directory. I've tried using the browse button to select the reference instead of picking from the list window, but that adds a GAC reference too.

这些引用都带有 .refresh 文件,并且在文件的属性中没有复制本地的选项.

These references all have the .refresh file with them and there is not an option to copy local in the properties of the file.

有什么帮助吗?!?

推荐答案

Chris,你可能早就解决了这个问题,但我在 VS 2005 中尝试做同样的事情时偶然发现了你的问题.以防其他人来在这里寻找解决方案....

Chris, you're probably long past this problem, but I stumbled upon your question when trying to do the same thing in VS 2005. In case anyone else comes here looking for a solution....

当然,您是对的,Web 项目不会像普通项目那样为您的引用提供复制本地选项,因此复制本地...解决方案是行不通的.

You are correct, of course, that a web project does not give you the copy local option on your references that a normal project does, so the Copy Local... solution is a non-starter.

我通过简单地将现有文件添加到我的网络应用程序的 bin 目录来解决这个问题.缺点是它没有添加刷新引用,因此如果您重建外部文件,则必须手动刷新本地副本.

I worked around this problem by simply adding an existing file to my web app's bin directory. The drawback is that it doesn't add the refresh reference, so if you rebuild the external file you'll have to manually refresh the local copy.

这篇关于向项目添加非 GAC 参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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