Reputation: 8003
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:
Upvotes: 0
Views: 5590
Reputation: 4172
Making use of the shadow copy feature of .NET is not a bad idea. It will allow you to update your assemblies without having to exit the application BUT you will need to restart the application in order to run the updated version. Shadow copy will simply allow you to overwrite the assemblies and nothing else.
Note that you cannot enable shadow copy on the default AppDomain
. This means that you will need a loader that will create the AppDomain
, and execute your application. Have a look at this answer for the steps you need to take and for a simple implementation.
If all you want to do is allow updates to be installed without having to exit the application then this is the simplest approach I can think of.
You should also have a look at Microsoft's ClickOnce technology. It solves a lot of the common problems of deploying and updating .NET GUI applications.
Upvotes: 2
Reputation: 16167
Creating a shadow copy is not going to update your application. The general sequence of auto-updating requires a third application that manages the process. It looks something like this.
Obviously there is going to be error handling logic built in to this. But that is the general idea. Shadow copies are nowhere in there.
Upvotes: 2