ASP.NET vNext comes with new runtime environment called KRE. Besides KRE that runs ASP.NET vNext applications there are also tools for managing KRE versions and NuGet packages that application uses. This posting gives you quick overview about K-world components and explains shortly how to use them.
K has three components:
- KRE – K Runtime Environment is the code required to bootstrap and run an ASP.NET vNext application. This includes things like the compilation system, SDK tools, and the native CLR hosts.
- KVM – K Version Manager is for updating and installing different versions of KRE. KVM is also used to set default KRE version.
- KPM – K Package Manager manages packages needed by applications to run. Packages in this context are NuGet packages.
To better understand how this K-stuff works take a look at the following image:
Here is the example set of commands to install K, take source from Git repository and run the application after packages are downloaded.
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/master/kvminstall.ps1'))" kvm upgrade git clone https://github.com/aspnet/Home.git cd Home cd samples cd HelloWeb kpm restore k web
If everything went normally then you should see some output from simple web server and you can point your browser to URL that you can find from project.json file.