How to get Assembly Version (not File Version) for another EXE?

后端 未结 1 1959
小鲜肉
小鲜肉 2021-01-01 09:47

You can use the following to get the File Version:

FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(\"filename.exe\");

But how

相关标签:
1条回答
  • 2021-01-01 09:57

    From this blog article How to get assembly version without loading it:

    AssemblyName.GetAssemblyName("filename.exe").Version
    

    This avoids having to load the assembly in its entirity.

    0 讨论(0)
提交回复
热议问题