[英].NET versions in ASP.NET 5
In the new ASP.NET 5 projects, there are multiple ways / places to control the .NET versions: 在新的ASP.NET 5项目中,有多种方法/位置来控制.NET版本:
global.json
在global.json
dnvm list
在包管理器控制台中,使用dnvm list
dnvm list
在应用程序根目录中的正常控制台中,使用dnvm list
Which of these are the same (apart from the first two) and what do they all do? 哪一个是相同的(除了前两个),他们都做了什么?
The dnx
in global.json
is only used by VS. dnx
中的global.json
仅供VS使用。 No one else uses it and if you run the application outside of VS, there is no guarantee that it'll use that version. 没有其他人使用它,如果您在VS之外运行应用程序,则无法保证它将使用该版本。
The dnx
used to run a particular application is set in two ways: 用于运行特定应用程序的dnx
有两种设置:
dnx
. 将完整路径传递给特定的dnx
。 Eg: C:\\dnx\\dnx.exe . run
例如: C:\\dnx\\dnx.exe . run
C:\\dnx\\dnx.exe . run
dnx
on the PATH resolved according to your OS' PATH resolution (we don't control that). PATH上的dnx
根据您的dnx
解析(我们无法控制)来解决。 When you run dnvm use <version>
, that particular version is added to the path and it will be used by that particular process and it's child processes. 当您运行dnvm use <version>
,该特定版本将添加到路径中,并且该特定进程将使用它并且它是子进程。 If you run dnvm use -p <version>
, that version of dnx
is added to the user's PATH in addition to the process' PATH. 如果运行dnvm use -p <version>
,除了进程'PATH之外, dnx
将该版本的dnx
添加到用户的PATH中。
For VS, if no version is specified in global.json
by default it uses the dnx
under the default
alias. 对于VS,如果默认情况下global.json
没有指定版本,则它使用default
别名下的dnx
。 The default alias is updated when you run dnvm upgrade
or dnvm use -p
运行dnvm upgrade
或dnvm use -p
时会更新默认别名
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.