Sounds like a simple question, but Google doesn't seem to have an answer for me.
In the .NET Framework, we can use it Environment.SystemDirectoryto get a system catalog (which will look something like C:\WINDOWS\System32), but this property does not exist in current versions of .NET Standard or .NET Core. Is there a way to get this folder in the .NET Standard library (or otherwise, .NET Core)?
For my purposes are not required to call returns something useful on non-Windows-platforms (and that he would return anyway? /lib? /usr/lib? Etc.), though, I think it would be great if done .
Now it seems that my best option is to try using C:\WINDOWS\System32directly, and if this does not exist, try using it C:\WinNT\System32, but it looks like such a hack to do it this way.
source
share