红隼运行的框架? [英] Kestrel Running which framework?
问题描述
我有一个新的ASP.NET项目5和设置project.json如下;
I have a new ASP.NET 5 project and setup the project.json as below;
"frameworks": {
"dnx451": {
"dependencies": {
"ExternalLibrary": "1.3.0" }
},
"dnxcore50": {}
}
我通过红隼运行的项目,在project.json定义的默认命令。
I'm running the project through Kestrel with the default command defined in project.json.
"kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5001"
一切工作正常。该项目运行和依赖性效果很好。我唯一没有谁在使用哪个底层框架决定理解呢?
Everything works fine. The project runs and the dependency works well. The only thing I don't understand it who decides on which underlying framework to use?
据我理解,如果红隼使用dnxcore50项目应该失败。如果是这样的话,我们如何推动茶隼使用它?
As far as I understand the project should fail if Kestrel uses dnxcore50. If that is the case how do we push Kestrel to use it?
正如一个侧面说明,项目运行pretty良好,没有错误可言,但是当我尝试手动建立与DNU项目,我得到下面的错误。我不认为在这一点至关重要,因为它不会在运行时会导致故障,据我所看到的。只是想将其添加的情况下,它帮助。
Just as a side note, the project runs pretty good with no errors at all, but when I try to manually build the project with DNU I get the error below. I don't consider it critical at this point, as it does not cause a failure during run time as far as I can see. Just wanted to add it in case it helps.
推荐答案
在Visual Studio 2015年,所用的框架在这个顺序确定:
In Visual Studio 2015, the framework used is determined in this order:
-
项目属性。在Solution Explorer中右键单击.xproj并选择属性。前往应用程序部分(默认值),你可以使用特定DNX版,包括版本,平台和架构。
The project properties. Right-Click the .xproj in your Solution Explorer and select Properties. Head to the "Application" section (the default), and you can "Use Specific DNX version", including version, platform, and architecture.
的global.json。我不知道是否该平台可以在这里改变,但是,例如:
The global.json. I don't know if the platform can be changed here, but for example:
"sdk": {
"version": "1.0.0-beta6-12032"
}
Visual Studio中默认使用依赖于它的版本具体的运行时间。我相信,2015年VS RC默认使用BETA4,.Net框架,64。
Visual Studio uses a specific runtime by default depending on its version. I believe that VS 2015 RC uses beta4, .Net Framework, x64 by default.
当从命令行运行,它是由您主动确定 dnvm
。您可以使用命令 dnvm列表
来显示已安装的虚拟机。你会得到类似下面的列表:
When running from the command line, it's determined by your active dnvm
. You can use the command dnvm list
to display your installed VMs. You'll get a list similar to the following:
Active Version Runtime Architecture Location Alias
------ ------- ------- ------------ -------- -----
1.0.0-beta4 clr x64 C:\Users\Matt\.dnx\runtimes
1.0.0-beta4 clr x86 C:\Users\Matt\.dnx\runtimes
1.0.0-beta4 coreclr x64 C:\Users\Matt\.dnx\runtimes
1.0.0-beta4 coreclr x86 C:\Users\Matt\.dnx\runtimes
1.0.0-beta4-11566 clr x86 C:\Users\Matt\.dnx\runtimes
1.0.0-beta5-11855 clr x64 C:\Users\Matt\.dnx\runtimes
1.0.0-beta5-11855 clr x86 C:\Users\Matt\.dnx\runtimes
1.0.0-beta5-11855 coreclr x64 C:\Users\Matt\.dnx\runtimes
1.0.0-beta6-11921 clr x64 C:\Users\Matt\.dnx\runtimes
1.0.0-beta6-11921 clr x86 C:\Users\Matt\.dnx\runtimes x64
1.0.0-beta6-12005 clr x64 C:\Users\Matt\.dnx\runtimes
1.0.0-beta6-12005 clr x86 C:\Users\Matt\.dnx\runtimes
* 1.0.0-beta6-12032 clr x64 C:\Users\Matt\.dnx\runtimes default
1.0.0-beta6-12032 clr x86 C:\Users\Matt\.dnx\runtimes
的 *
表示当前的虚拟机。 coreclr
使用 dnxcore50
,和其他人(可能是单
上您的Mac)使用相应的框架,但似乎编译为 dnx451
。
The *
indicates your current VM. coreclr
uses dnxcore50
, and the others (likely mono
on your Mac) use the corresponding framework, but seem to compile as dnx451
.
这篇关于红隼运行的框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!