Tag: dnx50

环境。版本相当于核心clr

以下代码对dnx451框架有效,但对dnxcore50 string ver = Environment.Version 此方法不存在: dnxcore50框架中是否有等价的属性? 更新 根据Victors的回答,你可以使用PlatformServices.Default.Runtime例如: Console.WriteLine(“env: {0} {1}”, PlatformServices.Default.Runtime.RuntimeType, PlatformServices.Default.Runtime.RuntimeVersion); 输出:(在dnx451上) 环境:Clr 1.0.0-rc1-16231 输出:(在dnxcore50上) 环境:CoreClr 1.0.0-rc1-16231