System.Environment in .NET Core 1.0

后端 未结 1 870
终归单人心
终归单人心 2020-12-20 13:16

Does anybody knows how to get information about current environment and platform in .NET Core? Currently there are no Environment class in Core library.

相关标签:
1条回答
  • 2020-12-20 13:36

    System.Environment is available in the System.Runtime.Extensions package. Ensure you've referenced that package in your project.json.

    {
      "frameworks": {
        "dnxcore50": {
          "dependencies": {
            "System.Runtime.Extensions": "4.0.10-*"
          }
        }
      }
    }
    
    0 讨论(0)
提交回复
热议问题