answers inline
Daylor said:
can shadowcopy be done with private assembly ?
yes, it can be.
any info about how shadowcopy actually works ?
When you create an appdomain, you can specify whether shadow copying is to
be turned on. Use the overloaded form below -
AppDomain.CreateDomain(string, Evidence, string, string, bool);
and set the last argument to true to turn on shadow copy for that appdomain.
If it is ON, when an assembly is loaded into the appdomain, a copy of the
assembly is made in a cache somewhere. The cached copy is then used, so that
you are free to modify the original assembly. The next time that that
assembly is loaded, the new copy will be picked up.
Since the original assembly was not locked, you dont have to kill the app to
replace the assembly.
when im compiling an assembly (while the assembly file is in use ), what i
need to do ?
change vertion ? change name of file ?
no, you dont need to do any of these. as long as you set the ShadowCopyFiles
property of the appdomain to true, all the assemblies loaded in the domain
are shadow copied. note that you cannot change this property once you've
already loaded assemblies into the domain. the property must be set before
the first assembly is loaded.
how the appDomain will know to load the new assembly ?
it doesn't load the new assembly automatically. only when the domain is
recycled will the new assembly be loaded.
rajasi