11

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

enter image description here

Warren P
  • 65,725
  • 40
  • 181
  • 316
Bogdan
  • 1,945
  • 2
  • 12
  • 8

1 Answers1

12

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-*"
      }
    }
  }
}
Donnelle
  • 5,689
  • 3
  • 27
  • 31
bricelam
  • 28,825
  • 9
  • 92
  • 117