Hello guys, it was nice to speak on ASP.NET vNext on 13th September @Delhi Developer's day. The audience was awesome and I had an interactive session during the talk and afterwards with all the participants. Thanks all!
This article covers the theory and installation of ASP.NET vNext and I'm planning to write a series on the subject. The future article will carry more details and coding examples. So tune in to this.
ASP.NET vNext
At TechEd North America this year, Microsoft announced the next generation of .NET. ASP.NET vNext is an open-source framework and the next generation of ASP.NET. Its entire code is available at Github. It's a lean and composable .NET stack for building modern cloud-based apps.
CTP3 release
Its Community Technology Preview 3 (CTP3) release (pre-beta, alpha) you can say it is not yet production-ready, so please don't use it in production. I would say do not install in a machine where your production Visual Studio version is installed, install it in another machine, just to be on the safe side.
Features
The following are the features of ASP.NET vNext:
- Cloud-ready out of the box
- Open Source: Its open source and available at https://github.com/aspnet
- Dependency Injection: Its built into vNext and is consistent across the stack
- Cross-platform support: an active collaboration with Xamarin to ensure that cloud-optimized .NET applications can run on Mac or Linux on top of the Mono runtime
- You will be able to compile C# 6 and VB with the Roslyn compilers. You can make code changes in a .cs file and don't need to build it.
- No longer dependent on Visual Studio. You can choose editors of your choice now, such as WebStorm, Sublime text and so on. But Visual Studio gives a good user experience
- Modular Stack: ASP.NET vNext will ship as NuGet packages. Now you can choose what you want to keep
- MVC6: MVC and Web API have been merged into a single programming model. It's a single programming model for building Web sites and services
Advantages (Pros)
Many people asked me what the advantages and disadvantages of vNext are. My answer is the preceding features indicate many advantages; for example, the Rosyln compiler, cross-platform, a lean & composable framework and many more that I listed in the preceding section. Isn't it cool?
Disadvantages (Cons)
I don't have an answer to the question of what the disadvantages are, honestly. Its a CTP release and not in production, I request that you hold your nerve and wait for some time and we'll come to understand after the production launch.
Install ASP.NET vNext CTP 3
You can install vNext from the following URL: CTP downloads
Build and Run vNext Apps from the Command Line Windows
Now you can build & run vNext from the command line. But there are certain commands to set up your environment; you need to install the K Version Manager (KVM).
- Go to a command prompt
- Run the following command. It's a Powershell command:
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/master/kvminstall.ps1'))"
- Go to %USERPROFILE%
- You'll find a .kre directory, go to the bin folder containing the K commands, for example:
- Close the command prompt & run kvm list
- If you get the following output:
Then update your PATH variable as in:
set path=%path%;%USERPROFILE%\.kre\bin
Installation on MACBOOK (OSX)
If you've a MACBOOK, then you can use the following procedure and install it. The following procedure will also install mono, that's needed to run on OSX:
- Install homebrew
- Brew install mono OR download: Mono for Mac OS X
- brew tap aspnet/k
- brew install kvm
- source kvm.sh
- kvm install 1.0.0-alpha3
*Nix variants
I've not yet done a setup on *Nix variants (Ubuntu and so on), but will do soon and share in a future series. If someone wants to pair with me on learning vNext or you need help in setup, please tweet me @sumitjolly or email me [email protected]
Please share your valuable feedback.