简体   繁体   中英

Microsoft ASP.NET and Web Tools 2015 - DNX and DNVM

I have a doubt regarding Microsoft ASP.NET and Web Tools 2015 and the installations of DNX and DNVM. My point is the following: on the official ASP.NET Github there is outlined a procedure for installing DNVM and DNX. To install DNVM one runs the following command on CMD:

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "&{$Branch='dev';$wc=New-Object System.Net.WebClient;$wc.Proxy=[System.Net.WebRequest]::DefaultWebProxy;$wc.Proxy.Credentials=[System.Net.CredentialCache]::DefaultNetworkCredentials;Invoke-Expression ($wc.DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}"

As said on the page

This will download the DNVM script and put it in your user profile. You can check the location of DNVM by running the following in a cmd prompt:

the DNVM is installed on the user profile on the folder .dnx\\bin . Also when using DNVM to download a DNX, it gets installed on .dnx\\runtimes together with dnu .

I followed this procedure and installed DNVM before installing Visual Studio 2015 and now I've installed Visual Studio 2015 and the Microsoft ASP.NET and Web Tools 2015. Now, when installing the latter, a folder Microsoft Web Tools was created on Program Files containing a DNX folder and a DNU folder.

In that case, Visual Studio keeps its own folders of runtimes? It won't use the ones I got on my user profile? I found quite strange to have this duplication. Also, when installing the web tools, there was one instruction to also install .NET Version Manager, which would be yet another installation of DNVM on Program Files.

This duplication confused me. Is that really the way things work? This doesn't have any problem? Is there any way to have everything in one place only?

If you install dnvm using the MSI (or through VS), dnvm ends up in Program Files. If you just run the scripts on the home repo, it ends us in your user profile.

The dnvm actually used is based on how the os resolves paths (since both folders are added to PATH). Usually, the one in your user profile takes precedence.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM