I have found that on some projects I have worked on, that every time I change any aspx or html code in a .net 2.0 website project, and click refresh on the browser, I get an error message telling me the .dll can not be found.
Compilation Error
An error occured during the compilation of a resource required to service this request.
The dll name is one of the long named page specific dlls that the .net runtime uses to compile the code behind for this page.
After much investigation I found that the error is due to .net monitoring the number of changes I make to the project and then wanting to recompile the project after a certain number has been reached. By default this number is 15. This is why some people on the forums say it seems to happen intermittently. It doesnt, it happens after 15 changes.
However, sometimes this default number is overwritten and this is the case in Commerce Server web sites. It happens everytime you make a change.
This is obviously extremely annoying to have to recompile every time a simple html change is made.
The reason this doesnt happen in a live environment is because .net actually does recompile the changes on the next request. In a debug environment, the debugger if attached locks out .nets ability to recompile the project and so you get the above error.
To fix this problem, you can add the attribute:
numRecompilesBeforeAppRestart
to the compilation node in the web.config file.
I have set mine to 500 whilst debugging.
I now can change the html / aspx without that error appearing.