简体   繁体   中英

How to create an executable to update a DLL in an installed application

I am looking at making an application more modular and accessing dlls so that I can change them if the client was wanting different functionality.

I know how to create the dlls and reference them, but I am trying to find a way to create an executable that will install a different version of a dll into the required application folder. I want to avoid having to put the new dlls into the original project and build a new install file and I want to keep things simple for the end user.

Currently I am using visual studio 2010

You could create MSI files for each of your dlls and use the standard installer process to update the dll. It is also possible to write an exe that downloads and extracts which will have an arbitrary amount of logic (licensing, download location now and then...).

A combnation of both might seem an interesting thing. A bootstrapper downloading msi files and silently installing them. You could have advanced features in the installer while having the freedom to decide what and when to install on your own.

Technical aspects popping into my mind: files in use may not be changed and if you change the interface theunchanges main program won't be able to use the new library.

It seems you're searching for a plugin architechtecture, you might want to look at MEF or Unity to perform the compositiom, but that is more a side comment.

There are few SO thread available on this great website. You should explorer them and try the best way to implement whatever situation you have..

Check these reference links:

from: Creating a patch to upgrade .NET application

If you already use aa VS Setup Project you can deploy the new version of this project and it will upgrade existing installations. Have a look at the setup and upgrade ids. The stop and start of the service can be done by custom actions that can be defined in the project and will be executed ie when your setup is committed or rollbacked etc.

Patch development in DotNet
How to make Patch-able/Update-able application?
create patch file using .net windows application

Note: Ref this For clickonce how to build a patch for existing installer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM