AssemblyInfo.cs 파일에서 AssemblyVersion, AssemblyFileVersion 정보 구하기 위한 예제 코드입니다.
[AssemblyVersion] 구하기
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Assembly.GetName().Version.ToString();
[AssemblyFileVersion] 구하기
using System.Diagnostics;
FileVersionInfo fileVersion = FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location);
string strVer = fileVersion.FileVersion;
'C#' 카테고리의 다른 글
[C#]toolStripStatusLabel 우측 정렬 방법 (0) | 2021.03.11 |
---|---|
[C#]엑셀 파일 읽어올때 "Microsoft.ACE.OLEDB.12.0 공급자는 로컬 컴퓨터에 등록 할 수 없습니다." 오류 발생 시 (0) | 2021.03.11 |
[C#]log4net 예제 (0) | 2020.01.21 |
[C#]FormBorderStyle.None일 경우 화면 이동하기 예제 (0) | 2020.01.20 |
[C#]Form 위치 이동 예제 (0) | 2020.01.16 |