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