System.Environment in .NET Core 1.0
Asked Answered
B

1

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

Biddable answered 13/2, 2015 at 10:27 Comment(2)
@Andrei This is .NET Core: blogs.msdn.com/b/dotnet/archive/2014/12/04/…Keitloa
It's a static class and not a class that you new up. Maybe that's your confusion.Forest
M
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-*"
      }
    }
  }
}
Menthol answered 22/2, 2015 at 22:22 Comment(4)
Thank you! Still they do not implemented yet "Is64BitOperatingSystem" property for .NET Core.Biddable
See also dotnet/corefx#999 on GitHub.Menthol
I'm reporter of that issue :)Biddable
This refers to a now obsolete version of .net coreMenstrual

© 2022 - 2024 — McMap. All rights reserved.