在Asp.Net 2.0网站项目和Assembly Reference中?
Asp.Net 2.0 网站项目中保存的有关引用程序集的信息在哪里?因为这里没有 .csproj 文件,所以我们不知道在哪里寻找它。由于引用了多个版本的 log4Net,我们面临着问题,并且希望删除其中之一。
Where is the information about the Referenced Assembly kept in an Asp.Net 2.0 Web Site project. Since, there is no .csproj file here we don't know where to look for this. We are facing problems because of multiple version of log4Net being referenced and want to remove one of them.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
网站拥有的唯一信息是 DLL 存在于网站的 bin 目录中。当您将外部 DLL 添加到项目时,该 DLL 会被复制到 bin 中,并添加一个 .refresh 文件,该文件为 Visual Studio 提供原始 DLL 的路径,以便它可以在 DLL 发生更改时刷新该 DLL。
据我所知,web.config 中的程序集标记仅适用于添加到项目中的 GAC 程序集,而不适用于外部 DLL。
至于您的具体问题,如果您有类库,其中之一可能引用了不同版本的 DLL。您也可能有多个网站,其中一个网站的 .refresh 文件指向不同版本的 DLL。
The only information a website has is the fact that the DLL exists in the bin directory of the website. When you add an external DLL to a project, that DLL is copied into the bin, and a .refresh file is added that provides Visual Studio with the path to the original DLL, so that it can refresh the DLL when it changes.
As far as I know, the assembly tag in web.config is only for GAC assemblies that are added to a project, not external DLLs.
As to your specific problem, if you have class libraries, it is possible that one of those references a different version of the DLL. It is also possible that you have multiple websites and one of them has a .refresh file that is pointing to a different version of the DLL.
在 web.config 文件中的“Assembly”标签下
In the web.config file under "assembly" tag