简体   繁体   English

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

[英]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. 我对Microsoft ASP.NET和Web Tools 2015以及DNX和DNVM的安装存在疑问。 My point is the following: on the official ASP.NET Github there is outlined a procedure for installing DNVM and DNX. 我的观点如下:在官方的ASP.NET Github上,概述了安装DNVM和DNX的过程。 To install DNVM one runs the following command on CMD: 要安装DNVM,请在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. 这将下载DNVM脚本并将其放入您的用户配置文件中。 You can check the location of DNVM by running the following in a cmd prompt: 您可以通过在cmd提示符中运行以下命令来检查DNVM的位置:

the DNVM is installed on the user profile on the folder .dnx\\bin . DNVM安装在文件夹.dnx\\bin上的用户配置文件中。 Also when using DNVM to download a DNX, it gets installed on .dnx\\runtimes together with dnu . 此外,当使用DNVM下载DNX时,它将与dnu一起安装在.dnx\\runtimes上。

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. 我按照此过程安装了DNVM,然后安装了Visual Studio 2015,现在我安装了Visual Studio 2015和Microsoft ASP.NET和Web Tools 2015.现在,安装后者时,在包含Program Files的文件夹上创建了一个文件夹Microsoft Web Tools DNX文件夹和DNU文件夹。

In that case, Visual Studio keeps its own folders of runtimes? 在这种情况下,Visual Studio保留自己的运行时文件夹? 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. 此外,在安装Web工具时,还有一条指令还要安装.NET版本管理器,这将是Program Files上的另一个DNVM安装。

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. 如果使用MSI(或通过VS)安装dnvm,dnvm将在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). 实际使用的dnvm基于os如何解析路径(因为两个文件夹都添加到PATH)。 Usually, the one in your user profile takes precedence. 通常,用户配置文件中的那个优先。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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