Questions tagged [shadow-copy]

Shadow copying enables assemblies that are used in an application domain to be updated without unloading the application domain. This is particularly useful for applications that must be available continuously, such as ASP.NET sites.

From MSDN

Shadow copying enables assemblies that are used in an application domain to be updated without unloading the application domain. This is particularly useful for applications that must be available continuously, such as ASP.NET sites.

The common language runtime locks an assembly file when the assembly is loaded, so the file cannot be updated until the assembly is unloaded. The only way to unload an assembly from an application domain is by unloading the application domain, so under normal circumstances, an assembly cannot be updated on disk until all the application domains that are using it have been unloaded.

When an application domain is configured to shadow copy files, assemblies from the application path are copied to another location and loaded from that location. The copy is locked, but the original assembly file is unlocked and can be updated.

89 questions
0
votes
1 answer

Visual Studio 2015, T4 template: Assembly directive does not use Shadow Copying

When rebuild the solution, I got error message:- Error Unable to copy file "obj\Debug\TargetTest.dll" to "bin\Debug\TargetTest.dll". The process cannot access the file 'bin\Debug\TargetTest.dll' because it is being used by another process. …
Costa
  • 3,897
  • 13
  • 48
  • 81
0
votes
1 answer

External Component Exception Involving Shadow Copy Folder

I have an application that is throwing an "External component has thrown an exception" error when trying to communicate from C# to C++ (correction: this is from C++ to C#). The C# solution involves a VSTO add-in that we think may be associated with…
0
votes
1 answer

Antivirus keeps deleting my addins, how do I disable Shadow-Copy in VB.Net?

So this has become very annoying to me. Whenever I compile an Outlook Addin, shadow copy creates a copy in the assemblies directory. My anti-virus then detects the new DLL and promptly deletes it. (Good anti-vurus, no wait, bad anti-virus) I would…
0
votes
1 answer

is there any volume shadow copy SDK for windows 8?

i tried to install windows volume shadow copy SDK but when i see this link it only support for windows 2003 and xp http://www.microsoft.com/en-us/download/details.aspx?id=23490 i tried to force install to see what will happen and i developed it…
user965347
  • 186
  • 2
  • 16
0
votes
1 answer

When will pdb files be copied to shadow copy directory?

I am doing some modifications on OpenCover and NUnit to suit my needs. Briefly, I want to get coverage information even when shadow-copy is enabled in Nunit. However, OpenCover is unable to track an assembly when the pdb file is absent. When…
Nan Wang
  • 736
  • 1
  • 6
  • 5
0
votes
1 answer

Can't get ShadowCopy to work

I have the following code in Assembly 1 Public Interface ITest Sub Run() End Interface Public Class Runner Inherits MarshalByRefObject Public Sub Run(pluginPath As String) For Each assemblyPath As String In…
Peter
  • 37,042
  • 39
  • 142
  • 198
0
votes
0 answers

Accessing Shadow copy of drive with C#

We have to write a file in one drive (L) which is the shadow copy of the C drive. We tried with normal like below. string datFile = "L:\\DATA\\ABC.DAT"; string message = "test"; try { using (StreamWriter writerAppend =…
Anto Varghese
  • 3,131
  • 6
  • 31
  • 38
0
votes
2 answers

Get application directory in both console application and its unit tests

I have a console application project with NUnit tests in the same project. I have been trying to apply this solution. At run-time the solution worked OK. But when I ran the tests by Resharper test runner or NUnit GUI runner,…
Andrej Adamenko
  • 1,650
  • 15
  • 31
0
votes
0 answers

Remove cache from assembly location during uninstall

I have created an Office addin and windows installer application for it. According to this article, addins dll'a are copied to directory like this…
0
votes
2 answers

c# shadowcopy example

I need to update my executable with also the dll linked.. I've read about the AppDomainSetup.ShadowCopyFiles but I'm in trouble trying the right steps to do what I need the question are: the shadow copy I need to create only when I notify an update…
ghiboz
  • 7,863
  • 21
  • 85
  • 131
0
votes
1 answer

Can you shadow copy MAF Addins in ASP.NET

Is it possible to configure MAF in an ASP.NET such a way that it loads shadow copies of an addin assembly? I'd like the ability to update an addin without manually restarting the web server.
spooner
  • 322
  • 2
  • 15
0
votes
1 answer

C#: AppDomain ShadowCopyDirectories is empty

i'm new in appdomain concept. It stated here that shadow copy creates a copy of the assembly you are referencing but when I check my ShadowCopyDirectories, it is empty. Here's my code: AppDomainSetup sandboxDomainSetup = new…
xscape
  • 3,318
  • 9
  • 45
  • 86
-1
votes
1 answer

samba shadow copy cannot match

The test machine is running Ubuntu server 20.04 LTS, I'm tring to expose zfs snapshots to samba share as shadow copies but failed. Here is the smb.conf share block: [Storage] comment = NAS Storage path = /storage/smb browseable = yes …
Ferrets
  • 1
  • 1
-1
votes
1 answer

AppDomain shadow copy - Loading /Unloading a dynamically loaded Dll

The Code as below which i'm trying to load a dll dynamically is not working. AppDomain appDomain = AppDomain.CreateDomain("DllDomain"); Assembly a = appDomain.Load(fileName); //Assembly a = Assembly.LoadFrom(fileName); objType =…
venkat
  • 5,648
  • 16
  • 58
  • 83
1 2 3 4 5
6