I am running an ASP.NET 3.5 web application in developments. Development means that I need to modify App_Code fairly often. When I upload updated .cs files into App_Code, on the next page load, I get this error:
The assembly 'C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET
Files\root\a18f28ce\a6daf424\App_Code.dll' is already loaded in another appdomain.
Setting <deployment retail="true" /> in machine.config can help solve this issue.
No page will load until I stop and start the application pool. Stopping and starting the application pool will clear the error, and the changes in App_Code will be present.
There are other websites running on the same server, but each is in its own application pool. This site is only the only one in its application pool (v2.0 integrated, like the other application pools).
This didn't used to happen. I would have a few seconds pause when updating App_Code, and then the application would perform as expected. I assume it was automatically recycling the application pool. That doesn't appear to be happening anymore, and it's a pain to stop / start the application pool for every change.
I don't want to set retail to true, since this would affect trace output, custom errors, and debug capabilities, which I need.
Any suggestions? Thanks!