Getting the Version of my C# app?

后端 未结 3 1441
失恋的感觉
失恋的感觉 2021-02-03 22:11

I am working on desktop application. I have create a setup.

Ex. My Application. Version is 1.0.0.

I want to get the current version

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-03 22:39

    System.Reflection.Assembly executingAssembly = System.Reflection.Assembly.GetExecutingAssembly();
    var fieVersionInfo = FileVersionInfo.GetVersionInfo(executingAssembly .Location);
    var version = fieVersionInfo.FileVersion;
    

提交回复
热议问题