Wednesday, November 26, 2008

Cannot create/shadow copy 'VariousFileName' when that file already exists

"Cannot create/shadow copy 'VariousFileName' when that file already exists" is a .NET problem with a quick cure.

Try this first: If you just made a change to a file in the App_Code directory, wait for Visual Studio to finish compiling and stabilizing. This message comes up often if you have been debugging or working with some code and then make a quick change in an App_Code directory file. If this doesn't work, go to the following.

There's a web.config solution for this problem: adding to the system.web element of your web.config file.

The 'shadowCopyBinAssemblies' property is described as follows: Sets a Boolean value indicating whether the assemblies of an application in the Bin directory are shadow copied to the application's ASP.NET Temporary Files directory.



0 comments: