0条评论
还没有人评论过~
使用
System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription
获取到的内容为 .NET Core 4.6.27317.07
,这个是什么鬼啊。
怎么从RunTime中获取到像下面这样的
除了从csporj
文件中提取配置,或者是从Assembly
中获取到配置
corefx 目前没有 api 可以准确获取 .net core 的版本,详见 Get the .NET Core version number at runtime
除了你不考虑的2个方法,还可以通过在程序中执行 dotnet --info
命令获取