我只遇到这个问题
- Windows Server 2016 (Win2016) 和
- VisualStudio-redistributable 2015 (VS-redist-2015 = msvcp14)
c#Environment.SetEnvironmentVariable(key,val, EnvironmentVariableTarget.Process)
似乎没有设置可以使用getenv()在本机 C 应用程序上检索的值
native-C app getenv()可以使用 Win2016 + VS-redist-2010 读取值 OK
这在使用 VS-redist-2015 的 Windows Server 2012 和 2008 中运行良好
任何想法/建议将不胜感激。