当前位置:网站首页>C#获取exe的版本号-文件版本and程序集版本
C#获取exe的版本号-文件版本and程序集版本
2022-06-25 06:39:00 【※※冰馨※※】
通过System.Diagnostics.FileVersionInfo.GetVersionInfo获得是文件版本,即对应[assembly: AssemblyFileVersion("")],而不是[assembly: AssemblyVersion("")]。 在右键文件属性中看到的也是文件版本(或者产品版本)。
而通过以下代码获取的是assembly版本[assembly: AssemblyVersion("1.0.0.0")],如下:
var softwareVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
如果要获得当前程序的文件版本,则代码为:
System.Windows.Forms.Application.ProductVersion.ToString();
边栏推荐
- Construction of occupancy grid map
- Advanced mathematics foundation_ Parity of functions
- 线程状态变化涉及哪些常用 API
- Leetcode daily question - 515 Find the maximum value in each tree row
- Authentique Photoshop 2022 expérience d'achat partage
- Genuine photoshop2022 purchase experience sharing
- 数据可视化没有重点怎么办?
- 指南针可以开股票账户吗?安全吗?
- CPDA|数据分析师成长之路如何起步?
- 函数模板_类模板
猜你喜欢
【蒸馏】PointDistiller: Structured Knowledge DistillationTowards Efficient and Compact 3D Detection
为什么要“除夕”,原来是内存爆了!
Chuantuwei ca-is3720lw alternative material No. iso7820fdw
JMeter introduction practice ----- use of global variables and local variables
Modular programming of digital light intensity sensor module gy-30 (main chip bh1750fvi) controlled by single chip microcomputer (under continuous updating)
Chuantu microelectronics breaks through the high-end isolator analog chip market with ca-is3062w
Harmony美食菜单界面
Zhugeliang vs pangtong, taking distributed Paxos
栅格地图(occupancy grid map)构建
TEMPEST HDMI泄漏接收 1
随机推荐
STL教程4-输入输出流和对象序列化
This year, I graduated
Cocos learning diary 3 - API acquisition nodes and components
國外LEAD域名郵箱獲取途徑
shell小技巧(一百三十四)简单的键盘输入记录器
Chuantu microelectronics breaks through the high-end isolator analog chip market with ca-is3062w
【pytest】修改allure报告中的logo及参数化
双三次差值bicubic
Let's talk about MCU crash caused by hardware problems
【UVM入門 ===> Episode_9 】~ 寄存器模型、寄存器模型的集成、寄存器模型的常規方法、寄存器模型的應用場景
[QT] shortcut key
Application scheme | application of Sichuan earth microelectronics ca-is398x in PLC field
MySQL facet 01
RTKLIB-b33版本中GALILEO广播星历存储问题
My debut is finished!
Runtime——methods成员变量,cache成员变量
Mysql database import SQL file display garbled code
realsense d455 semantic_ Slam implements semantic octree mapping
Sichuan Tuwei ca-if1051 can transceiver has passed aec-q100 grade 1 certification
对链表进行插入排序[dummy统一操作+断链核心--被动节点]