Fix environment loading for Visual Studio