Sunday, March 13, 2005

The VS.Net 2003 Bug

Last Friday I was working on a Visual Studio .Net 2003 project. Everything was working fine, and suddenly I got this error in Visual studio:
"Could Not Copy Temporary Files to the Output Directory"
"The file 'assembly name' cannot be copied to the run directory. The process cannot access the file because it is being used by another process."

I did not know what I did to upset Visual studio. I opened task manager and hunted for some vague process which might be holding the particular dll which was being built; result: none :(

The first thing to do in such cases is: take a long breath, open http://www.google.com and just copy paste the error you are getting; result: Bug in Visual studio .net 2003. As it turns out there is some bug in Visual studio which gets into action if one of the referenced dlls is more than 64 KB:

"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."