shadow-copy

MEF and ShadowCopying DLLs so that I can overwrite them at runtime

扶醉桌前 提交于 2020-01-01 08:19:09
问题 I am trying to stop my application locking DLLs in my MEF plugin directory so that I can overwrite the assemblies at runtime (note I'm not actually trying to have MEF reload them on the fly, at the next app start is fine, i just dont want to have to stop the app to do the copy) I am trying to do this by creating a shadow copied app domain for my mef loaded assemblies as below: [Serializable] public class Composer:IComposer { private readonly string _pluginPath; public Composer

MEF and ShadowCopying DLLs so that I can overwrite them at runtime

Deadly 提交于 2020-01-01 08:19:07
问题 I am trying to stop my application locking DLLs in my MEF plugin directory so that I can overwrite the assemblies at runtime (note I'm not actually trying to have MEF reload them on the fly, at the next app start is fine, i just dont want to have to stop the app to do the copy) I am trying to do this by creating a shadow copied app domain for my mef loaded assemblies as below: [Serializable] public class Composer:IComposer { private readonly string _pluginPath; public Composer

Creating a shadow copy using the “Backup” context in a PowerShell

只谈情不闲聊 提交于 2019-12-20 09:47:43
问题 I am in the process of writing a PowerShell script for backing up a windows computer using rsync. To this end, I am attempting to use WMI from said script to create a non-persistent Shadow copy with writer participation (as is apparently recommended for backups). I found out from another question (Accessing Volume Shadow Copy (VSS) Snapshots from powershell) a way to create a shadow copy in general, but the example given there uses "ClientAccessible" as the context parameter, which result in

Best method for implementing Self-Updating Software

孤街浪徒 提交于 2019-12-20 09:40:01
问题 We have a minimal 'updater' exe that checks a remote URL for updates, downloads them and replaces files on disk prior to launching the real application. However if we want to replace the updater EXE then AFAIK we have two options: Shadow Copying Assemblies whereby .Net will create a shadow copy of the EXE (and any referenced assemblies) and load those assemblies, such that the non-shadow assemblies can be replaced and will be used when the application is next launched. Identify which files

What is the right way to set shadow copying for the default AppDomain

怎甘沉沦 提交于 2019-12-17 23:38:49
问题 Relating to Can I make the default AppDomain use shadow copies of certain assemblies?, it describes a working solution to activate shadow copying within the default AppDomain for a specific directory. Basically it says to use these simple methods: AppDomain.CurrentDomain.SetShadowCopyPath(aDirectory); AppDomain.CurrentDomain.SetShadowCopyFiles(); But because the methods used here are marked as obsolete I was wondering what is now the correct way to accomplish the same. The warning message

Add directories to ASP.NET shadow copy

╄→гoц情女王★ 提交于 2019-12-12 14:25:35
问题 In my ASP.NET app, I'm attempting to add another directory to be have the DLLs in it shadow copied. The only method I found that will allow m to do this is AppDomain.CurrentDomain.SetShadowCopyPath . However, this method is marked as Obsolete . MSDN has this to say about it SetShadowCopyPath(String path) Message: AppDomain.SetShadowCopyPath has been deprecated. Please investigate the use of AppDomainSetup.ShadowCopyDirectories instead. However, the AppDomainSetup.ShadowCopyDirectories

What does ShadowCopyFiles property in appdomain does?

给你一囗甜甜゛ 提交于 2019-12-12 10:38:53
问题 I know when you set to true ,it will shadow copy the files.But what does shadow copy mean and why we need to shadow copy files? 回答1: Shadow copy creates a copy of the assembly you are referencing. The reason for this is that .Net (more exactly Windows) cannot unload (some) assemblies within a process once loaded. Because of this you could never replace an assembly without shutting down the entire process because the file remains locked by the OS. However if you have a shadow copy .Net

How do I turn off shadow copy in a Visual Studio 2010 test project?

不问归期 提交于 2019-12-07 20:23:49
问题 When using NUnit, I can turn off shadow copy so that my test assemblies are run from the output directory. I need this because my tests in this case aren't unit tests, but are integration tests which need to be able to access some of the assemblies that are copied into the output directory by the build. However, I can't find a way of turning off shadow copy when I'm using the Visual Studio 2010 test runner to run Visual Studio Test Projects. Could someone please let me know how to do that?

Shadow Copying, and mixed C# and C++ DLLs loading from arbitrary folders

非 Y 不嫁゛ 提交于 2019-12-07 12:30:59
问题 I have a VS 2005 C# project that uses a special Plugin folder to load extra DLLs (for use as nodes in an asset conversion process). I have a mixture of C# and C++ DLLs in this folder. The issue I have is that when Shadow Copying is enabled, the C++ DLLs refuse to load using Assembly.LoadFrom. I have attempted to create a custom app domain, and used Load, but this also failed. Finally, I tried reading the DLL in as byte[] data and using Load on that - again, only the C# DLLs would work this

Shadow Copying, and mixed C# and C++ DLLs loading from arbitrary folders

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 22:35:16
I have a VS 2005 C# project that uses a special Plugin folder to load extra DLLs (for use as nodes in an asset conversion process). I have a mixture of C# and C++ DLLs in this folder. The issue I have is that when Shadow Copying is enabled, the C++ DLLs refuse to load using Assembly.LoadFrom. I have attempted to create a custom app domain, and used Load, but this also failed. Finally, I tried reading the DLL in as byte[] data and using Load on that - again, only the C# DLLs would work this way, with an error "Additional information: Unverifiable code failed policy check. (Exception from