ASP.NET 5: What are KRE, KVM, KPM?

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:

  1. 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.
  2. KVM – K Version Manager is for updating and installing different versions of KRE. KVM is also used to set default KRE version.
  3. 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.

Liked this post? Empower your friends by sharing it!
Categories: ASP.NET

View Comments (13)

  • I wonder why "K" word is used. Java uses "J" for JRE and JVM but why "K" from Microsoft. What was the rationale behind it?

  • Looks very promising. Also I spotted "--watch" option for k.
    I understood this should pick up (partially recompile) my changes to sources.
    But actually when I'm running

    k --watch web

    it starts and works, but only I make a change to the file, it stops and returns back to OS.

    There's workaround - to use
    k --watch web & k --watch web & k --watch web
    command or recursive batch file.
    Would love to know if is there a proper way for getting instant changes as I change *.cs files?

  • I tried also --watch option and found the same thing - it crashes if I change *.cs files. I'm sure it's bug and it will be fixed in next versions of K. By CTP public releases interval I estimate that next CTP will be here in the end of next month.

  • Confusing as hell. Too many theorists have injected abstractions that are essentially unusable and confusing to 99% of the developers. Keep it simple. Very simple. If not, MVC dies.

  • It's not so bad, don't worry. Everything still runs in Visual Studio same way and you can publish your app to Windows Azure same way. This K-world is here just to support some server scenarios like true side-by-side execution and multiple operating systems.

  • Unless things are as simple as node.js there is no need for further intrinsic architecture. If it can just mimic node.js and do away with creating middleware that are just necessary and attract other technologists to do MS, you have taken a big pie.
    When non MS people are doing away with versions and doing only latest why is there a KVM?

    When NPM is the only word, why KPM and NuGet?

    The more you complicate the less it is usable

  • Well, all this K-tooling is above .NET framework in big picture. KPM uses actually NuGet to download packages and it runs on all supported platforms. This K-world may seem mysterious and complex but I hope my future posts help to get better picture what is going on.

  • I'm very happy to have come across this.

    I can't wait to start exploring KRE.

    I just spent the last 2 hours exploring Katana and OWIN, both new to me - but both worth the investment of time.

    Thankyou so much Gunnar for writing this.

  • My first impression on the letter K was the KDE and Konqueror.
    Personally I think the ASP team should of came up with something more original and specific to ASP - Like the J in JRE, JDK and JVM - Why not the letter A?

  • I think it will be changed before public release. Some parts were already renamed over last weeks.

Related Post