UPDATE: When I wrote this blog entry, the RC version was the latest version of the runtime. Recently,
BETA 3 was released which is later than the RC.
I spent a couple of hours today updating Visual Studio 2015 Preview to use the ASP.NET 5/MVC 6 Nightly Build. Because the process was a little tricky, I wanted to write a brief blog entry to document how I did it.
Download Visual Studio 2015 Preview
You can download Visual Studio 2015 Preview from here:
http://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs.aspx
Be aware that when you install Visual Studio 2015 Preview, it will use the Beta version of ASP.NET 5 (ASP.NET vNext) and not the Release Candidate version. You’ll need to follow the steps in this blog post to use the Nightly Build.
Configure NuGet
There are two different NuGet feeds that you can use to get the ASP.NET 5 packages:
-
Milestone Builds – https://www.myget.org/F/aspnetmaster/api/v2
-
Nightly Builds – https://www.myget.org/F/aspnetvnext/api/v2/
If you want to update Visual Studio 2015 to use the Nightly Builds then follow these steps:
-
Open the menu option Tools, NuGet Package Manager, Package Manager Settings.
-
Click the Package Sources entry to view the current NuGet Package Manager sources.
-
Uncheck the source for aspnetmaster.
-
Create a new source for the Nightly Build at aspnetvnext.
You can read more about this on the ASP.NET vNext Wiki:
https://github.com/aspnet/Home/wiki/Configuring-the-feed-used-by-kpm-to-restore-packages
Update MVC 6 to the Release Candidate
If you want to use the latest version of MVC 6 then you need to update your project.json file in the root of your project. Here’s what my updated project.json file looks like:
{ "webroot": "wwwroot", "version": "1.0.0-*", "exclude": [ "wwwroot" ], "packExclude": [ "**.kproj", "**.user", "**.vspscc" ], "dependencies": { "Microsoft.AspNet.Server.IIS": "1.0.0-*", "Microsoft.AspNet.Mvc": "6.0.0-*" }, "frameworks" : { "aspnet50" : {}, "aspnetcore50": { } } }
Notice that I am using “1.0.0-*” for the version of IIS and “6.0.0-*” for the version of MVC. This will give me the latest versions (the Nightly Build).
Update the KRuntime for your Machine
In order to use the Release Candidate of ASP.NET 5, you need to update the runtime itself. Open up a Command Prompt As an Administrator and execute the following powershell command:
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/kvminstall.ps1'))"
Next, run kvm upgrade to install the latest version of the runtime
After you complete this step, run kvm list to view all of the runtimes installed on your machine. You should see the rc1 runtime listed.
Finally, perform a kpm restore to get the latest version of all of the packages.
Read more about this step here:
https://github.com/aspnet/Home/issues/218
Update the KRuntime for Your Project
Next, you need to update your Visual Studio project to use the RC runtime. Follow these steps:
-
Right-click your project in the Solution Explorer Window.
-
Select the KRE-CLR.x86.1.0.0-rc runtime.
-
Click the Save button (the floppy disk).
Summary
After you complete all of the steps above, you should have the latest version of ASP.NET 5 and MVC 6. Your References folder should look like this:
Why go through all of this work to upgrade from the Beta to the Release Candidate? The Release Candidate has lots of interesting new features such as new IActionResults that you can use with controller actions.
Hope this helps!
why do you have a RC version ? I only see beta 3 10914
Two notes:
1) for some reason, “rc1” versions are older than the “beta3”. If you are on the bleeding edge, you’re on beta3
2) don’t forget, after “kvm upgrade”, do a “kvm upgrade -amd64” to get the 64 bit version.
The command should be ‘kpm restore’ not ‘kvm restore’.
@James – thanks! Fixed.