Check out the SetShadowCopyFiles and SetShadowCopyPath members on the AppDomain class. In this case, as Adam notes below, you will need to create an explicit AppDomain and load your assemblies into that. Eric Gunnerson just had a great article on creating/loading separate AppDomains in his last C# column in MSDN Magazine.
John > -----Original Message----- > From: Moderated discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED]] On Behalf Of Sills, Adam > Sent: Wednesday, July 10, 2002 7:30 PM > To: [EMAIL PROTECTED] > Subject: Re: [ADVANCED-DOTNET] Assembly.LoadFrom and File Locking > > > Actually calling LoadFrom on any assembly locks it until the > calling AppDomain is shut down. You can create a new > AppDomain and load the assembly into that, and unload the > AppDomain when you're finished with it to unlock the file. > > Adam.. > > -----Original Message----- > From: Keith Franklin [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 10, 2002 11:50 AM > To: [EMAIL PROTECTED] > Subject: [ADVANCED-DOTNET] Assembly.LoadFrom and File Locking > > > Looking into different methods of using Assembly.LoadFrom > > Noticed that LoadFrom from a network share results in the > files being locked. So that another process (person) trying > to copy new versions to the share will be thwarted. > > Any way around this? > > You can read messages from the Advanced DOTNET archive, > unsubscribe from Advanced DOTNET, or subscribe to other > DevelopMentor lists at http://discuss.develop.com. > You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.
