O
Oenone
I've an ASP.NET 2.0 project into which various Plug-In DLLs can be
installed. I'm running it in the ASP.NET Development Server. In order to
load one of the PlugIn DLLs I'm using
System.Reflection.Assembly.LoadFrom(filename) to load the DLL and then
calling CreateInstance on the assembly that is returned.
This is all fine, but when I stop the project from running, change the code
and then re-compile it, I'm frequently getting a message from the compiler
as follows:
\\\
Unable to copy file "obj\Debug\Plugin.dll" to "bin\Plugin.dll". The process
cannot access the file "bin\Plugin.dll" because it is being used by another
process.
///
The only way I've found to get past this is to right-click the ASP.NET
Development Server icon in the system tray and tell it to Stop. This gets
extremely tedious after a while.
Is there any way to programmatically release the loaded plugin assemblies
once I've finished using them? I can't find any method on the Assembly
object that looks like it may facilitate this.
Failing that, can anyone suggest any other method of stopping the
development server from locking the DLL, so that subsequent builds can be
copied over the top of it?
Many thanks,
installed. I'm running it in the ASP.NET Development Server. In order to
load one of the PlugIn DLLs I'm using
System.Reflection.Assembly.LoadFrom(filename) to load the DLL and then
calling CreateInstance on the assembly that is returned.
This is all fine, but when I stop the project from running, change the code
and then re-compile it, I'm frequently getting a message from the compiler
as follows:
\\\
Unable to copy file "obj\Debug\Plugin.dll" to "bin\Plugin.dll". The process
cannot access the file "bin\Plugin.dll" because it is being used by another
process.
///
The only way I've found to get past this is to right-click the ASP.NET
Development Server icon in the system tray and tell it to Stop. This gets
extremely tedious after a while.
Is there any way to programmatically release the loaded plugin assemblies
once I've finished using them? I can't find any method on the Assembly
object that looks like it may facilitate this.
Failing that, can anyone suggest any other method of stopping the
development server from locking the DLL, so that subsequent builds can be
copied over the top of it?
Many thanks,