Groups | Blog | Home
all groups > dotnet general > july 2003 >

dotnet general : shadowcopy can be done with private assembly ?


Daylor
7/16/2003 4:22:00 PM
can shadowcopy be done with private assembly ?

any info about how shadowcopy actually works ?

when im compiling an assembly (while the assembly file is in use ), what i
need to do ?
change vertion ? change name of file ?

how the appDomain will know to load the new assembly ?

Rajasi Saha
7/16/2003 6:15:38 PM
answers inline

[quoted text, click to view]

yes, it can be.

[quoted text, click to view]

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.

[quoted text, click to view]

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.

[quoted text, click to view]

it doesn't load the new assembly automatically. only when the domain is
recycled will the new assembly be loaded.

rajasi

AddThis Social Bookmark Button