Monday, 23 February 2015

HOW TO ADD AUTOMATIC VERSION UPDATER IN C#?

Adding version updater for Assembly files in projects:-
=====================================================

 STEP 1:
----------
1. Add a new folder[e.g- utils] in your project solution and add a updateversions.exe file
2. Add the same file in the physical location as well.
3. You need to provide the path of all assemblies for which you want to change the versions.
4. Add versions.txt file in a new folder[e.g:-Solution item] in your project solution
5. Add same file in physical location as well.

STEP 2 :
----------
1. Next you need to add the locaion of your updateversions.exe in the Properties\"BUILD EVENTS"
 of your client project.
2.In the "Pre-build event command line" of build events, write the following code:-
if $(ConfigurationName) == Release (
"$(SolutionDir)"utils\updateversions.exe "$(SolutionDir)")
3. Now run the project in "Release" mode and your updater will update the assembly version
as you desired

UPDATEVERSION.EXE
versions.txt
 

No comments:

Post a Comment