How to change the version of the application at runtime in C #

0

I need to change the application version from 1.0.0.0 to 1.1.0.0 at runtime, as I can do since the ProductVersion property is just get;

    
asked by anonymous 24.03.2017 / 17:10

1 answer

2

I think runtime is not the ideal way to do this.

The ideal way to update this version id, it would be during your Continuous Integration process, for example, I use VSTS (Visual Studio Team Services) for my DevOps scenario, and I do exactly the change you need .

During my automated build process, I run a powershell script (or even a vsts task) that accesses the assemblyinfo.cs file (in the case of clear C #), and updates that version ID according to ID of the build, so that if necessary I can trace that version 1.0.0.10293 was generated by the build with the same ID.

    
04.07.2017 / 19:04