aspnet / dnvm

OBSOLETE - see readme
Other
174 stars 61 forks source link

dnvm use does not persist when we call it from Vim. #512

Closed shaunluttin closed 8 years ago

shaunluttin commented 8 years ago

Steps to reproduce.

  1. Open Vim.
  2. Run dnvm use <some-non-active-version>
  3. Run dnvm list
  4. The active version has not changed.

On my machine this only happens from Vim. It does not happen from either PowerShell or the command line.

analogrelay commented 8 years ago

This is probably because vim is starting a new shell in order to run your command. It's not possible for a sub-process to affect the environment variables of a parent process. Since DNVM/DNX are being phased out in favor of dotnet, this probably isn't something we're going to fix here.

As a workaround, you could try using dnvm run or dnvm exec to run commands in the context of a specific DNX version (see dnvm help run/dnvm help exec for more info on those).

muratg commented 8 years ago

Yup, doesn't look like a DNVM issue. Besides like @anurse mentions above, we're moving to dotnet cli in RC2, and no more changes in DNVM planned.

shaunluttin commented 8 years ago

Perfect. Thank you for the detailed answer.