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:

K Runtime from zero to running application

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(''))"
kvm upgrade
git clone
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.

Gunnar Peipman

Gunnar Peipman is ASP.NET, Azure and SharePoint fan, Estonian Microsoft user group leader, blogger, conference speaker, teacher, and tech maniac. Since 2008 he is Microsoft MVP specialized on ASP.NET.

    15 thoughts on “ASP.NET 5: What are KRE, KVM, KPM?

    • October 20, 2014 at 1:12 pm

      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?

    • October 21, 2014 at 10:15 pm

      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?

    • October 27, 2014 at 9:00 am

      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.

    • October 28, 2014 at 4:39 pm

      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.

    • October 29, 2014 at 5:47 pm

      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.

    • October 31, 2014 at 11:59 am

      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

    • October 31, 2014 at 2:12 pm

      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.

    • November 10, 2014 at 5:13 am

      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.

    • April 1, 2015 at 10:18 am

      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?

    • April 8, 2015 at 12:16 pm

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

    • Pingback:Shahed Chowdhuri's Blog: ASP.NET 5 Overview: Post-Build 2015 | Wake Up And Code!

    • Pingback:Preparing for ASP.NET vNext and Visual Studio 2015 | Rob Sanders: Sanders TechnologyRob Sanders: Sanders Technology

    Leave a Reply

    Your email address will not be published. Required fields are marked *