aspnet/dnvm

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

Closed this issue · 3 comments

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.

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).

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.

Perfect. Thank you for the detailed answer.