get application version in windows application c# -


i use code application version

private string currentversion     {                 {             return applicationdeployment.isnetworkdeployed                    ? applicationdeployment.currentdeployment.currentversion.tostring()                    : assembly.getexecutingassembly().getname().version.tostring();         }     } 

but in debug mode , when publish , install application 1.0.0.0. how can fix problem?

in line of code trying obtain assembly version.

return assembly.getexecutingassembly().getname().version.tostring(); 

you need set assembly version in properties -> application -> assembly information.


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - How to Hide Date Menu from Datepicker in yii2 -