有没有办法在不使用 mono 的情况下在 Linux 中获取 .Net 可执行文件的 AssemblyVersion?我想要的是一个脚本或命令,可以让我在 Linux 机器上获取 AssemblyVersion。我试过:
#strings file.exe | grep AssemblyVersion
but it only the string and not the number. Also checked with:
#file file.exe
but only got general information.
有任何想法吗?
尝试匹配跨越整行的版本号:
$ strings file.exe | egrep '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'
在我的(几次)测试中,AssemblyVersion
二进制文件的值始终是最后的结果。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)