Get Started With ASP.Net 5 vNext on Windows

This is my first time experience with ASP.NET 5. I'm excited about the new open source .Net CLR. The promise from Microsoft to use new technology without affecting the current environment of .Net is quite impressive. So we're going to talk about it how it works. This article will be a startup for people that intend to start with ASP.NET 5 applications. Just to impress you with what they did. How did they do it? It will come with another article of minie so keep an eye.

what is next

As the title says, this article is about the ASP.NET vNext on Windows so though it's open source in this article I'll cover only the Windows platform.

For the very first we need to understand the terminology. Here are a few:

  • K
  • KVM
  • KPM

These are the terms (or more of commands) we're going to use throughout this article.

Run the following script via PowerShell. Make sure you are running PowerShell with Admin privileges.

powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/master/kvminstall.ps1'))"

In the original documentation it has @ at the start but you need to remove it to make it run.

Now run that in the command prompt and try running the kpm command. This will not say the command doesn't exist but it'll show you the help menu of the kvm command.

Now try running KVM List on the command prompt. It won't show a result if you're running it the first time. Don't worry, run the following command:

KVM UPGRAGE

It'll install the latest KRE and K platform on you machine. Still you're far away to get the latest open source .Net CLR. ;) Download the latest samples for ASP.NET 5 sample application or clone it via GitHub.

Run the command prompt and go to the application directory of downloaded samples and run the command “K Run” or “K Web” depending on what kind of application you have in the sample application collection.

I promise to have a separate dedicated article explaining the K platform but this time we're just going to experience the free world of open source .Net. No installation but just a developer experience.

Run the following command in the sample application via command prompt:

KPM RESTORE

It'll restore the required runtime or call the .Net CLR for you application. Now there is just another step left to take.

  • K Run
  • K Web

Depending on your application if it has a Main or if It's a web application you'll see the console messages or just a mesasge “Started” after launching the command.

If it's a console application you'll see a console message on the same command prompt otherwise if it's a web it'll just say “Started”. Now go to “http://localhost:5001” to access the hosted application. This is a default port and it's configurable.


Similar Articles