Introducing ASP.NET vNext
There’s some really cool stuff going on on the ASP.NET and Web Tools team. The team has been pushing open stuff at Microsoft for a few years now and we've joined forces with the amazing innovators from the .NET core team and beyond! Some of these features are 10+ years in the making from a host of technical wizards across many teams and disciplines.
Today we’re announcing a preview (read: alpha) of the next generation of .NET on the Server.
You may have heard about some of these announcements at Build:
- .NET Native - compile .NET ahead-of-time. Everything gets faster.
- .NET Compiler Platform ("Roslyn") - All new C# and VB compilers, new language features, compiler-as-a-service and it’s Open Source.
- Nextgen JIT - All new optimized JITter for the latest processors
ASP.NET vNext will take things to the next level. Today, you run ASP.NET using the same CLR that desktop apps use. We’re adding a cloud-optimized (my cloud, your cloud, their cloud - server stuff) version optimized for server scenarios like low-memory and high-throughput.
ASP.NET vNext will let you deploy your own version of the .NET Framework on an app-by-app-basis. One app with new libraries can’t break an app next door with a different version. Different apps can even have their own cloud-optimized CLR of their own version. The CLR and cloud-optimized libraries are NuGet packages!
In this screenshot you can see build 418 and build 420 of the new framework (note how small they are) in my packages folder. These NuGet packages include the complete "Core CLR" and the cloud-optimized .NET Framework. You can deploy your own CLR and .NET Framework with your app as a NuGet.
I can run ASP.NET vNext apps within Visual Studio, of course, and within IIS, but I can also easily "self-host" them from the command line or within my own application. This alpha includes command line tools for running and managing ASP.NET vNext apps.
The "kvm" command allows me to control my environment. I run "kvm list" to see what versions of the ASP.NET vNext are available. I can switch between them on a per-environment basis:
C:\>kvm list
Active Version Runtime Architecture Location
------ ------- ------- ------------ --------
0.1-alpha-build-0418 svr50 x86 C:\Users\scottha\.kre\packages
* 0.1-alpha-build-0418 svrc50 x86 C:\Users\scottha\.kre\packages
0.1-alpha-build-0420 svr50 x86 C:\Users\scottha\.kre\packages
0.1-alpha-build-0420 svrc50 x86 C:\Users\scottha\.kre\packages
I set the active version with "kvm use version" and opened two command prompts, setting different CLR and .NET versions in each.
I’m running the same app twice, once per command prompt. I put version 420 on port 5420 and version 418 on port 5418.
This little app below outputs the current running version of ASP.NET vNext. Here I’m running the same app at the same time under different builds of the next generation of ASP.NET
The project system is also changing - we’re integrating packages.config, NuGet specifications (nuspec), and project files (csprojs) into a unified view of your project dependencies expressed in a project.json file.
NuGet packages and class libraries are treated the same. You get full intellisense in the project.json file and NuGet packages come down automatically and transparently. Even better, let’s say NuGet package Foo.Bar has a bug but you’ve only got the NuGet package. You can make a folder called Foo.Bar in our local project and put the source via "git clone" in that folder. This is great for open source projects. That local version overrides the NuGet, allowing you to easily patch bugs locally in libraries while you wait for a new release. When a new fixed NuGet-distributed version shows up, update the version and delete the local source.
One of the great aspects of environments like node or rails is that they are "no compile." Just change some code and hit refresh. With the next version of ASP.NET you get the power and throughput of the .NET runtime plus the "Roslyn" compiler-as-a-service for a "no-compile compile." That means means during development time you can just change your C# classes and hit Refresh in the browser. It's the power of .NET with the dynamism of a refresh-and-go development experience.
NOTE: This isn't ASP.NET Websites, or Razor View compilation - this is the whole thing, compiled in memory. You can use Visual Studio for development, or text editors like Sublime, or freakin' Notepad. (Of course, if you want assemblies on disk, you can do that too.)
See my web app’s bin folder in the screenshot below? There’s no assemblies in there because the assemblies never exist on the disk. It’s actually faster and easier to have the compiler do all the work in memory. This way you don’t have to read source, write out dlls, then read the dlls in again. (That DLL is part of the magic that makes it all happen.)
If you like, when your web projects build for deployment, they can also build as NuGet packages. You publish your project and every needed dependency comes along.
You’ll be able to put ASP.NET vNext on your existing servers, any hoster, and Azure of course.
You can opt in or out of the cloud optimized framework for compatibility. The next version of ASP.NET is modular and all about choice. your choice of framework, your choice of runtime, your choice of operating system, your choice of text editor.
ASP.NET vNext is:
- Cloud and server-optimized
- ASP.NET MVC and Web API have been unified into a single programming model
- No-compile developer experience
- Dependency injection out of the box
- Side by side - deploy the runtime and framework with your application
- NuGet everything - even the runtime itself
- All Open Source via the .NET Foundation and takes contributions
Oh, and by the way
- ASP.NET vNext (and Rosyln) runs on Mono, on both Mac and Linux today. While Mono isn't a project from Microsoft, we'll collaborate with the Mono team, plus Mono will be added to our test matrix. It's our aspiration that it "just work."
There will be lots of new information and details coming out over the next several months!
Sponsor: Many thanks to Izenda for sponsoring the blog feed this week! Intuitive Ad Hoc Reporting with Stunning Visualizations - Embed real time dashboards into your ASP.NET applications for easy, custom reports across all devices. Download a FREE TRIAL of Izenda Today!
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
I was really missing ASP.Net on linux.
This is the right direction for future Microsoft!
Michael
-Keith
I'm eagerly waiting for more info with the server optimized .NET and the ASP.NET MVC/Web API unification. Thank you for all of your hard work!
Does vNext finally break the dependency on VS to build ASP.NET projects? Seems silly to install VS Shell on an automated build server just to show HTML. (Likewise, MSTest also requires VS to build)
As for yaml, it has had some serious security issues in the rails framework which lead to remote code execution. I'm sure this problem has been resolved, but I'd hope they stick with json as its less likely to open holes in applications.
Like everyone here, I'm uber excited about some of these newer horizons that Microsoft is starting to chart!
Is there any nod to these OSS projects that they did it first and MS took inspiration from them.
This announcement is great but I get the impression the masses will receive it as "ooh, MS are really on the ball, aren't they great" and not realise small amounts of individuals do this thing as OSS and have it working well.
That means means during development time you can just change your C# classes and hit Refresh in the browser.
Now, if the client (non-WinRT) version is just a great, it will be huge.
This is awesome! This new trend of news coming out of Microsoft and the .NET team is really exciting... :)
Regardless, neither is an issue in this new model. You can create controllers without any base class, and you can map controller actions (API and MVC) without regard for HTTP verbs if you prefer.
Does this mean I could slip some code onto a live production server without causing massive headaches with an entirely new deployment?
Oh I know, I know.. but real world sometimes demands patches need to be done NOW with a "proper" build done after hours.
Does this mean I could slip some code onto a live production server without causing massive headaches with an entirely new deployment?
Oh I know, I know.. but real world sometimes demands patches need to be done NOW with a "proper" build done after hours.
Questions:
"Dependency injection out of the box" - what's behind that. Some new DI container with new API we need to learn ? Hope not!
"ASP.NET MVC and Web API have been unified into a single programming model" - will there be some breaking changes ?
"deploy your own version of the .NET Framework" - looks like we'll get a new CLR and that loading fw assemblies from GAC will need to change.
Maybe strong naming the assemblies will also be changed ?
The project system is also changing - we’re integrating packages.config, NuGet specifications (nuspec), and project files (csprojs) into a unified view of your project dependencies expressed in a project.json file.
Is the project file going away? One of the reasons I like asp.net WebPages and the Web Site (not Web Application) model is because they are folder based. I didn't like that I was tied to a project file and needed VS.net to compile my project for deployment. With the Web Site model I also liked that I could just copy over changed files to my server.
This post sounds like things are moving more towards an environment where you can use any text editor to create an asp.net web site and we could forgo VS.net entirely if we wanted to? These updates sound non dissimilar to how RoR works. Also it sounds like these changes could make it easier for other text editors to support asp.net development? It would be awesome if something light weight like Sublime or Atom could get asp.net plugins for some code completion and nuget.
What about security/bugfix updates? Does it mean the we have to:
- periodically check for security/etc updates
- download fixed NuGet packages
- deploy to production
Previously, the updates were installed automatically via Windows Update System.
@Scott, do you have any internal information about cross-platform UI development (except Xamarin)? :) It would be great to have managed UI framework that can run on Windows/Mac/Linux
.NET native & Linux support.
Travel back in time to 2005 and tell this to people. See how they react.
Since last week I'm very anxious to talk about this release! In my opinion this is the biggest change and improvement in ASP.NET since your launch.
Very happy with the new era that is comming!!! ASP.NET will be the best plataform ever.
Does that include System.Web?
Doesn't this seem contrary to developing open source libraries that take contributions? It is neat that you guys get to come up with all this cool stuff and share it with us (I'm excited!) but it does not help foster a community who regularly contributes and follows the development of ASP.NET.
Unless I'm missing something, where do I go to see roadmaps, repositories and discussions on this open source work?
Dependency injection out of the box
what is it? Ninject? StructureMap? Unity? Some other Microsoft built DI container?
In any case that's exciting!
One of the great aspects of environments like node or rails is that they are "no compile." Just change some code and hit refresh. With the next version of ASP.NET you get the power and throughput of the .NET runtime plus the "Roslyn" compiler-as-a-service for a "no-compile compile."
I have been waiting for this for SO long!!!
Thank you!
I'm so glad that my view of the future of application (web, desktop, cloud or whatever) development matches Microsoft's!
And thank you Scott for being a part of it! :)
I love the side by side of a framework :-)
I'm wondering though what a "cloud-optimized" CLR means, what's different about it and how is it better for ASP.NET? Perhaps this is something that is/will be explained on Channel 9 in more detail?
I updated my VS but when i generate a new project i don't get Project.json, i get the old template...
- Sid
Let's say that I have a server with .NET 2.0 and i CANT upgrade it, can I deploy a project with vNext using the latest features like async/await?
and what about mono? I knew that it was up to .NET 3.5, does it means that if I deploy a project made using 4.5.1 it will still works?
The big question, Scott, has to be - When are we going to get all this good stuff? What is the expected RTM date for these? The one I'm waiting for is Roslyn.
I've installed Update 2 but still not sure exactly what I've got with that - how much of the vNext stuff is in there? Looking forward to getting some concrete examples.
just a couple of questions, will the no-compile experience be optional to us, so if you still want to continue your way you will and the other guy will enjoy the No-compile experience as well?
second question: will both the traditional and the no-compile way run side-by-side?
Thank you,
Mohammed
What about impossible to get PerWebRequest-Lifestyle in MVC-application in Mono-xsp?
Is all this will works?
Is there a new managed webapp container exists?
I will say that I am surprised that you're allowing ASP .NET on non-Windows platforms. It seems like that would remove a key reason for people to purchase Windows Server licenses.
Is there any repository for this??
1. Can I run my MVC 5.x project on Linux or mono. Is sublime text are ready to run. What about C# intellisense.
If I will going to use Mono and sublime text (both are non-Microsoft product) then How Microsoft will charge me. I means Their is something on server that I need to pay for something else that Microsoft will charge me for using that kind of things.
Post is awesome. Really cool to see sublime text everywhere for coding :)
Microsoft is the only company trying to achieve cross-platform ubiquitous computing, while companies like Apple and Google are heading in the opposite direction with lock-in as their primary objective. Microsoft is reaching out, I just can't wait for other corporations to start reaching back.
Just wondering about performances, I did an installation on Windows7 and Windows8 of the MusicStore vNext sample ( https://github.com/aspnet/MusicStore) but at a first quick test (aka running it blindly) the vNext version seems pretty slow compared to the Mvc solution in the sample: 26 req/s against 440 req/s with 150 users with JMeter not downloading static content.
Does someone did some perf test, or am i missing some really important thing?
Plus i hate to be late... i had developed a command line webserver based on coroutines that does nearly the same... Node.Cs... but (apart from performance pow) Microsoft beated me on timing... sigh...
Endaroza
Combining MVC and WebApi makes a lot of sense, and compilation in memory bypassing disc looks really exciting and promising.
Also how is the performance on OSX / Linux compared to Windows?
The project system is also changing - we’re integrating packages.config, NuGet specifications (nuspec), and project files (csprojs) into a unified view of your project dependencies expressed in a project.json file.
Why json? I know it's 'so hot' right now..(jitterbug!).. but was there any other reason to choose this syntax? eg, why not a fluent c# .cs file, or xml, or ...(insert other here)..
I appreciate combining the project/nuget etc, that makes sense for sure. Just not sure of the final choice for container.
Personally, I wouldn't want xml, it's too wordy which was an issue I had with xaml, but a fluent c# file would be good imo.
Can we get a post on why/how .json was chosen as the metadata store?
It's been a while since I programmed some proprietory code (using up to ASP.NET 2.0). Now there seems to be a lot of open source libraries with things like NuGet and all sorts of JavaScript stuff. I have to be honest and say I've never used any open source in my projects and I'm not familiar with the licensing model(s). Are there any pitfalls in using these i.e. am I obliged to make my (proprietory) code open source by using them? Maybe it's different for different libraries and there's a guide out there somewhere? Thank you.
Finally we get app by app frameworks, this means we will no longer experience breakages because of some random patch to a framework because another app requires it.
Good stuff.
could you please confirm that ASP.NET vNext will be based on OWIN as Daniel Plaisted said? This would be GREAT news!! I created a spike using WebAPI and OWIN for our "next gen" architecture and I was very impressed with the possibilities.
In my case I used WebAPI for the services and the static files support for deploying a WinForms app (yes, some people use them :-) ) using ClickOnce. This worked as a charm. My next step was to provide support for our MVC application but sadly this was out of my reach using the current stack.
I love the idea of just serving my complete stack (services, Windows app using ClickOnce and Web client) from the same OWIN-hosted server.
Thank you for your great blog
Raúl
The project system is also changing - we’re integrating packages.config, NuGet specifications (nuspec), and project files (csprojs) into a unified view of your project dependencies expressed in a project.json file.
WIll this new project-system be limited to ASP.net or will it be in other project types (let's say a windows console application) when a Visual Studio vNext comes out?
Great News! Thank you!!
Some people think that FP has advantages over OOP. I certainly agree.
Having used Web API in the OOP/traditional way, I now follow panesofglass's lead and simply register a DelegatingHandler that calls into an F# assembly that does all the work in a functional / pipelined manner. The handler then returns the response that the functional code produces. (You also have to set up a single, generic route to prevent Web API from returning a 404 for every request.) Web API's routing, controllers, action selection, model binding, media type formatters, etc. etc. (i.e. the whole OOP model) - all are bypassed.
I hope that this way of working - with the DelegatingHandler - will still be supported in Web API vNext.
NOCA - not only controller actions!
Generally, very good news. The .NET platform should become entirely open-source and this is a strong step ahead.
I have read all the articles and watched the teched videos. I think what you are doing is good, but it's too complex. So I have some criticism, maybe you can do something with it:
- I don't see the main value, just 10 new things, what's the overall story here?
- Cloud Optimized is a really silly marketing name
- Having csproj + project.json seems really confusing
- What actual problem is going to json configs solving? And do we really need a configuration for our configuration?
- The Github project list is totally confusing, for "One ASP.NET" you guys sure made a lot of projects to understand and grasp.
- When I compare what you guys are doing here, it seems like an all out attempt to replicate as much of what is good from other frameworks. Yet those others make it seems so much more smoort that what you guys have, that I'm not sure you got the point. Python's virtualenv is really much easier and I think overall better then "k setactive runtime" or whatever is happening there. I think you guys are overextending here, and I would be hesitant to move toward release too soon with this.
- Make sure YOU build REAL apps with this. In your presentation you said something like "the devs tell us this is really great", but those are framework devs. If you let them make some ph.d. stuff we will not use it...
Best of luck!
You are focussing waaay too much on the how, without having a story about the why... at all. And the how is now waaay too confusing, because it's pre-alpha and just not coherent, so without the why it _seems_ like you guys have no idea about our reality, and your enthousiasm is hard to understand.
I think that is why you got such lame applause at TechEd. Like me, the audience was probably missing the point.
And again, throwing out "Cloud Optimized" is not helping here...
this looks looks a huge step forward for ASP.net.
Although there is just a preview (or alpha as you want us to read), I'm sure many people out there would like to play around with it.
Could you please write a blog post on how to do it?
Great development does this rid us of the ASP.NET Temporary files dir as well?
e.g. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files
Can't wait :)
Loved this. Btw, WCF is dead?
JSON doesn't support comments!
I appreciate the desire to adopt JSON as a format, but please Microsoft/Scott don't corrupt it.
Mac hardware is great so I always use my Mac book Air however I am also a .Net developer for 10 years. What I have to do right now is to install Windows 7 on a VM, etc.
Thanks MS
I feel so excited about all these news and I love the underlying vision.
In recent years we've seen the .NET community seriously hit as Microsoft dropped XNA for game developers, confused the developer community with Windows 8 and Xamarin moved the focus of mono development away from web and towards closed-source mobile support so getting any web app newer than 2010 to run on linux became an uphill struggle.
I am so glad that Microsoft is finally taking cross platform portability seriously and I hope I won't be in the minority in considering moving back to to .NET development as my primary platform. Visual Studio is leaps and bounds above any other IDE and the C# language is the cleanest, most elegant and most productive I've ever used.
I think there are still 3 pieces missing from the puzzle though:
1) We need a similar thing to happen on the database side... some sort of self-hosted SQL server that can also run on mono.
2) Ideally, we need an official way to deploy C# apps to other platforms that doesn't require expensive closed-source third party plugins like Xamarin. Surely with Microsoft's resources we could have an official *free* .NET runtime port by now which could run C# code natively on iOS and Android?
3) We need a new .NET graphics framework like XNA, but updated and cross platform (something like monogame).
It might even be as simple as Microsoft adding SQLite, PostgreSQL or some other open source, cross-platform database in as the default go-to database for Visual Studio 2013 and then buying or doing a deal with Xamarin and MonoGame to allow those components to become a free, open and standardised part of the core .NET ecosystem.
Any chance of that Scott? :)
Thanks,
Imran
Hopefully someone will clear that out for me, anyways way to go Microsoft, you are definitely taking in the right direction with all those new incredible tools.
Thanks for that, and keep up the great work, .NET Rules!
Comments are closed.
Thanks Scott for the nice peak in future.