File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -217,9 +217,14 @@ protected override void Initialize() {
217217 Environment . SetEnvironmentVariable ( NodejsConstants . NodeToolsProcessIdEnvironmentVariable , Process . GetCurrentProcess ( ) . Id . ToString ( ) ) ;
218218
219219#if DEV15
220- var root = Environment . GetEnvironmentVariable ( "VsInstallRoot" ) ;
221- if ( ! string . IsNullOrEmpty ( root ) ) {
222- Environment . SetEnvironmentVariable ( NodejsConstants . NodeToolsVsInstallRootEnvironmentVariable , root ) ;
220+ var devenvPath = Environment . GetEnvironmentVariable ( "VSAPPIDPATH" ) ;
221+ if ( ! string . IsNullOrEmpty ( devenvPath ) ) {
222+ try {
223+ var root = Path . GetFullPath ( Path . Combine ( Path . GetDirectoryName ( devenvPath ) , @"..\.." ) ) ;
224+ Environment . SetEnvironmentVariable ( NodejsConstants . NodeToolsVsInstallRootEnvironmentVariable , root ) ;
225+ } catch ( Exception ) {
226+ // noop
227+ }
223228 }
224229#endif
225230 }
You can’t perform that action at this time.
0 commit comments