PDA

View Full Version : locked assemblies


Joakim Gran
04-23-2005, 01:46 AM
Assemblies loaded by spring are locked and the web application must be stopped/reset before they can be replaced with newer versions.

It seems like it doesn't always help to "touch" the web.config file for the web application to reload automatically, as is normally the case for assemblies that are not loaded dynamically by the spring ioc container.

When developing/debugging I always do a "Build All" in Visual Studio to ensure that the the web-application is completely reloaded. Which takes a bit longer than just hitting F5.

When upgrading a website I must always do an "iisreset" before replacing old assemblies with never versions.

Would be interesting to know how others handle the develop/test/debug iteration. Do you all constantly do "Rebuild All" in VS.Net? Perhaps I'm missing something easy here. :D

Perhaps using a second application domain for dynamically loaded assemblies would make it possible for spring to automatically reload if any loaded assemblies has changed on the filesystem.

/Joakim

Aleks Seovic
04-25-2005, 01:57 AM
I do both incremental and full builds and never had that problem.

The only thing I can think of that might be different is the location of DLLs. I put all DLLs I need into lib directory outside of the web application and reference them from there. During the build, VS.Net copies all referenced DLLs into web application's bin directory.

That way assemblies referenced by VS.Net (the ones in lib directory) are never really used by IIS -- only their copies are. When I need to update one of them I simply copy new DLL into lib directory and VS.Net automatically rebuilds the whole solution and copies updated DLL into bin directory when I run application.

Hope this helps,

Aleks