Bogdan
Bogdan

Reputation: 2235

System.Environment in .NET Core 1.0

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

Upvotes: 11

Views: 5913

Answers (1)

bricelam
bricelam

Reputation: 30435

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-*"
      }
    }
  }
}

Upvotes: 12

Related Questions