编译项目:“无法将文件“Web.dll”复制到运行目录

今天发现VS的一个BUG,每次编译项目的时候都说“无法将文件“Web.dll”复制到运行目录。另一个程序正在使用此文件,进程无法访问。”这个问题搞了两天都不知道为什么,刚开始在任务管理器里面一个进程一个进程得关,然后在关闭服务,都没有效果。然后在google上搜索了一下,在博客园看到两处,都提出了解决方法,可惜每个都不行。于是去msdn上查了一下,微软的解释是这样的:
CAUSE
This problem may occur when one of the assemblies that you compile is larger than 64 kilobytes (KB) and one (or both) of the following conditions is true:
• Your solution contains projects that are compiled to the same output folder.
• The Copy Local property on one of the referenced assemblies or projects is set to False.


RESOLUTION
To work around this problem, do any (or all) of the following, as appropriate for your projects:
• Compile the outputs for individual projects to different folders. Visual Studio .NET 2002 and Visual Studio .NET 2003 do not support a common output folder.
• Set the Copy Local property for the referenced assembly or project to True.
• Verify that you do not have the Object Browser window open.
• Verify that you do not have the same project (or projects) open in another instance of Visual Studio .NET.


MORE INFORMATION
This problem occurs when the IntelliSense engine of the project locks a referenced assembly. The IntelliSense engine locks only those referenced assemblies that are larger than 64 KB.

To resolve this assembly locking problem, the master copy of the referenced assembly must be left unlocked. You must provide another "lockable" copy of the referenced assembly to the IntelliSense engine. If the assembly reference has the Copy Local property set to True, and the project is being built to its own output directory, a lockable copy of the referenced assembly already exists.

The Copy Local property determines whether a private copy of a reference will be copied to the output path of the project. When a reference is added, the default value for this property is computed by the project system. Microsoft strongly recommends that you do not change this default value. Therefore, when you have the Copy Local property set to True for the referenced assembly, the IntelliSense engine locks this private copy of the assembly in the local Bin folder. This private copy of the assembly is automatically updated each time that the master copy of the assembly is rebuilt.


里面说微软已经承认这是一个bug了:Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
一看日期是三月十六的,我想VS2003出来很久了吧,难道大家都没有遇到这个Bug?顺便质疑一下那些常常以专家身份指责别人的所谓的牛人,他们在回答别人问题的时候真的有尝试过他们所说的那种解决方法么?术有专攻,最讨厌那种某个方面比较强就以为自己什么都了不起天下无敌手的人了,这些天在网上看到程序员之间的指责甚至谩骂太多了,SqlServer用多了你真的很了解Oracle么?.Net写多了你真的很了解Java么?《程序员》跟风似的说EJB不行了,可EJB真的一无是处么?难怪大陆的程序员总被台湾人嘲笑:“最近在大陸的論壇中 不過說了說 EJB 並非一無是處 就遭受的猛烈的炮火攻擊 好吧, 懶得替那個論壇做廣告 因為他們能力很強所以自視過高.. 我不過是小小台灣中的小小工程師 也只會做小小的案子 也沒有花時間精力研究新東西”。说起来是很丢脸的事情。

by howie 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值