简体   繁体   English

尝试使用VS2015遵循针对MVC 6的更新的MVC教程

[英]Trying to follow updated MVC tutorial for MVC 6 using VS2015

In the "adding a model" section of the tutorial, the instructions are: 在本教程的“添加模型”部分中,说明是:

Run the following commands in the command prompt: 在命令提示符下运行以下命令:

dnu restore
dnvm use 1.0.0-rc1-final -p
dnx ef migrations add Initial
dnx ef database update

When executing dnvm use 1.0.0-rc1-final -p I get an error of type Invoke-Command : Cannot find dnx-clr-win-x86.1.0.0-rc1-final . 执行dnvm use 1.0.0-rc1-final -p会收到类型为Invoke-Command : Cannot find dnx-clr-win-x86.1.0.0-rc1-final的错误Invoke-Command : Cannot find dnx-clr-win-x86.1.0.0-rc1-final So I find two possible solutions in this post: 因此,我在这篇文章中找到了两种可能的解决方案:

Solution #1: 解决方案1:

SET DNX_FEED=https://www.myget.org/F/aspnetrelease/
dnvm upgrade

Solution #2: 解决方案2:

If you want to use beta8 bits then you have to run "dnvm upgrade -u" (-u means unstable; aka dev feed) 如果要使用beta8位,则必须运行“ dnvm upgrade -u”(-u表示不稳定;也称为dev feed)

...but both solutions get my console stuck in this state (for more than an hour): ...但是两种解决方案都会使我的控制台卡在这种状态下(一个多小时):

Downloading dnx-clr-win-x86.1.0.0-rc2-16308 from https://www.myget.org/F/aspnetvnext/api/v2

 Installing runtime
    Unpacking runtime

Any way to circumvent these problems? 有什么办法可以避免这些问题?

The name of the dnx changed in the latest version of ASP.NET 5. It is now called 1.0.0-rc1-update1 . dnx的名称在最新版本的ASP.NET 5中已1.0.0-rc1-update1 。现在称为1.0.0-rc1-update1

You can find out the version name inside global.json file. 您可以在global.json文件中找到版本名称。

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

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