I encountered his error for the first time today. A Web Application Project I’ve been working on for the last months started throwing this error today almost every time I wanted to debug the project. The assembly info changed from time to time, but the error was the same. Most of the time I could ‘repair’ it by closing the ASP.Net development server. But sometimes, even that didn’t work.

After the first time it hit me today, I kept encountering this until I was fed up. I searched the internet, but there’s not much documented about this little bug. There are more people with the same problem but I didn’t find a solution at first. Then I found this page. That’s the exact error I’m getting! And now I think of it, I too always build my solution before I press F5 to debug. After searching based on that page, I found this post here. It seems there’s a web.config solution for this problem: adding <hostingEnvironment shadowCopyBinAssemblies=”false” /> 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.

Hope this helps.