New Tools and New Content - ASP.NET, Visual Studio 11 Web and .NET 4.5 Developer Preview (with commentary)
While all of you Build attendees are making me feel bad because you have a fancy Tablet and I don't (sell me yours!) the folks over here in the "Angle Brackets Team" (I'm trying out some new names. One will stick.) have been busy.
Here is a summary of all the items from our team that have been announced and shown at Build this week, all of this will be publicly available today (9/16) along with a some narrative and asides from yours truly.
They are listening
One of the things I am am personally enjoying in working daily with this build of Visual Studio is that there's dozens (hundreds) of little "mental speed bumps" that are smoothed over. A lot of thought was put into workflow and common scenarios in order to, well, get out of a developer's way.
Another constant source of happiness on my part is the team's realization that not everyone can upgrade their Visual Studio, so you can round trip your projects and solutions. I can use Visual Studio 11 Developer Preview and open a .NET 4 application, save the project, and then open it in Visual Studio 2010 and it'll just work. As it always should have. Teams can mix and match and the beta guy can be wacky without checking in solution files that will break the other folks.
By the way, have you seen our new org chart?
Big Aside: Changing how we release software
Scott Aside: It's also worth noting that while there is a bunch of stuff in the next version of Visual Studio, there's an equally compelling amount of stuff being released from the Azure/Web Team on NuGet. This gets to my LEGO analogy where we developers have more choice of what we snap together. Most importantly many things will only live on NuGet. I'm looking at the possibility of NuGet Feed of Supported Microsoft Products. Folks sometimes assume that NuGet is a place to throw binaries up because it's convenient, but we also need a way to know if a NuGet package is actually a support product, kind of like "Verified" is on Twitter. I'm interested in your thoughts on this in the comments, or even better, in the Discussion Tab on the NuGet project site.
Shipping via NuGet is also significant because it helps level the playing field with Open Source libraries. Microsoft's open source libraries will "compete" for our developer-attention by all being in NuGet, and folks should use the ones that make them happy. If you want to use Microsoft's Ajax Minifier or any of a half dozen others, then just get the one you want from NuGet. Microsoft's won't ship out of the box. It'll be on NuGet.
Visual Studio 11 Developer Preview
Tuesday the "Windows 8 Express" version of Visual Studio was released with the Windows 8 Developer Preview release which supports Windows 8 development. Wednesday during the keynote with Satya Nadella, Scott Guthrie, Jason Zander Visual Studio 11 Developer Preview and .NET 4.5 were announced. The bits are available today to the public.
ASP.NET 4.5 Developer Preview includes new core functionality like WebSockets, anti-XSS encoding, granular request validation. It also includes Web Forms improvements like model binding, support for HTML5 and unobtrusive JavaScript. And there have many performance improvements in ASP.NET when combined with Windows 8 Server can decrease startup time by 30% and reduce the memory footprint by 30%.
Scott Aside: I continue to put gentle pressure on all the teams about semantic versioning. In this case, .NET 4.5 is the right version number. It's using the .NET 4 CLR and is an additive (with bug fixes) release to .NET 4. Because it does that, it's very compatible. Your existing .NET 4 stuff won't (shouldn't) break. Check out the Target framework dropdown in this version of Visual Studio. See how you can target from 2.0 to 4.5 with the same IDE? That will be useful for corporate customers who need to develop 2.0 apps but still want the IDE improvements.
Visual Studio 11 Developer Preview includes new lots of new functionality including full editor support for CSS 3, full editor support for HTML 5, full editor support for JS, and many niceties like how Web Forms events can be wired up in source view, Web Forms designers can be launched directly from source view, how Live Inspector (code named "Eureka") makes editing the HTML of your document live much easier by automatically finding the HTML in your document as you select it in the Browser and much more.
Scott Aside: They've leveled the playing field across all the editors so things like regions, collapsing hierarchies, commenting, formatting, etc are all the same between CSS, JS, HTML and code. One more reason to just turn off all your foolbars and embrace the text editor and code.
You can read more about all the new features that are enabled in this release by reading the What's new in ASP.NET 4.5 and Visual Studio Web Developer whitepaper here: http://www.asp.net/vnext/whats-new.
NuGet 1.5 w/Dev11 Support Released
We just published an update to NuGet 1.5 that supports Visual Studio 11 Developer Preview. This allows developers on the Preview builds to continue to use NuGet with the preview releases of Visual Studio.
Note: NuGet does not support the "Windows 8 Express" release that was released yesterday. Support was just recently added to that SKU of Visual Studio and will appear in the next public preview release of "Windows 8 Express".
You can download the new release here: http://www.nuget.org/
ASP.NET 4.5
There's a lot of new improvements in ASP.NET and WebForms in particular in this coming release. ScottGu is doing a series and has done these posts already:
- Strongly Typed Data Controls (Sept 1st)
- Model Binding Part 1: Selecting Data (Sept 5th)
- Model Binding Part 2: Filtering Data (Sept 12th)
Model Binding will be familiar to MVC folks ,as is Routing. Both features now existing in both WebForms and MVC. So much time is spent in WebForms pulling data out of the request, via Forms, or QueryStrings, or Controls. Sometimes it seems like 30% of my WebForms code is just moving data from the Request into a variable. Now I can do this:
public IQueryable<Product> GetProducts(
[QueryString("q")]string keyword,
[Control("categories")]int? categoryId)
{
IQueryable<Product> query = _db.Products;
if (!String.IsNullOrWhiteSpace(keyword))
{
query = query.Where(p => p.ProductName.Contains(keyword));
}
if (categoryId.HasValue && categoryId > 0)
{
query = query.Where(p => p.CategoryID == categoryId);
}
return query;
}
This method supports a GridView that can sort, filter by category, and search via URL. Note the use of a nullable int as well. It makes WebForms code a lot cleaner, and it's just one example.
Scott Aside: ASP.NET 4.5 is additive to ASP.NET 4, so your existing apps will run, of course, but you can just start using these new features once you're using 4.5. I've been able to "refactor via subtraction" and yank out a bunch of tedious monkey code.
One other thing I wanted to say. It's becoming clearer to me that it's less about WebForms or MVC or WCF WebAPI Services or OData or IHttpHandlers or SingalR and more about ASP.NET. I used to call mix-and-match apps "hybrid" applications, but now I'm realizing they are just ASP.NET applications. I'll use whatever LEGO piece(s) I want and you should also.
MVC 4 and Web Pages 2 Developer Preview Released
ASP.NET MVC 4 Developer Preview is the latest release of our MVC framework. This release includes built-in support for mobile sites, new, fresh HTML5 project templates as well as jQuery Mobile. It has enhanced support for asynchronous methods, and custom code generation.
Also included are Web Pages 2 (like MVC with the V and C in the same file) a lightweight framework for creating dynamic, data-driven websites. The latest version expands support for mobile devices and for integrating client scripts, and adds helpers for tasks like mapping. You can download the new release for Visual Studio 2010 and Visual Studio 11 here: www.asp.net/mvc/mvc4
Scott Aside: Web Pages is what Rob and I used to make http://thisdeveloperslife.com and I'll be doing http://hanselminutes.com over again in Web Pages in the next week or so. If you love Razor just want a simple site, write code, hit F5, and deploy, WebMatrix and Web Pages is a nice change of pace. Also, the fact that they were able to integrate node.js into WebMatrix is not only cool but it brings up interesting questions about WebMatrix and what is can be used for. You can do PHP on it too, you know. Hm.
WCF 4.5 Developer preview AND "Web API" shipping out of band on .NET 4 and up!
Introduced Wednesday as part of .NET 4.5, includes new core WCF functionality like WebSockets, UDP multicast, improved streaming and better async support leveraging Tasks and C# async improvements. We continued our commitment to simplicity with a number of configuration improvements (read "reductions"), making WCF throttles and quotas work for developers by default, better manageability. The WCF Client programming model is included in .NET Core profile available to Windows-tailored app developer.
Scott Aside: I've used WCF for years, begrudgingly. It is powerful, no one would disagree, but it's notoriously complex and scary. I'm impressed with what they've done in this release because they've effectively used the infinite configurability of WCF and pluged in a re-imagination of what WCF works like in a world of REST and JSON. When it's time for WS-* and the Enterprise, that part of WCF is still there, but when you move to the RESTful open web of 2011-2012, the new Web API is clean and light, nicely integrated with ASP.NET and able to create simple and lightweight web services using things like JSON and conventions that make sense.
RIA with HTML5/JavaScript
Dinesh announced the developer preview for RIA for JS/HTML5 in his BUILD talk. It's a set of jQuery plugins that let you easily work with server data on the client. By bridging the different tiers, RIA/JS lets you quickly build rich forms-over-data applications with HTML/JQuery. The libraries are available via RIAServices.jQuery NuGet package as well as codeplex. The WCF RIA Services for Silverlight were also updated via WCF RIA Services V1.0 SP2 and WCF RIA Services Toolkit Aug 2011 update.
Scott Aside: RIA was another project that I had checked out very early on and said, meh. I'm zero for two on judging their projects because the WCF team has embraced jQuery, JSON and a more open web in a big way. I'm impressed with their efforts and open attitude. Take a look at their "BigShelf" starter project and check out how they are using jQuery to retrieve and bind, filter and sort data on the client side. Again, fewer black boxes since it's all HTML and JavaScript. Be sure to scroll down on that page as it's a complete walkthrough.
Here's a rollup of other related links for you, Dear Reader, with downloads at the very bottom.
Announcement Links
- This week the MSDN site (http://msdn.microsoft.com) will be highlighting each of the above releases and more.
- Scott Guthrie is blogging about all of the great new features and you can read some of the first posts here, there are more posts coming covering additional features:
- We have a new landing page on www.asp.net where we will cover all of our vNext releases. You can view it at www.asp.net/vnext. This will continue to update this week as the latest preview of Web API is released and Web Matrix 2 is released.
- Forum for feedback on ASP.NET 4.5 and VS 11
- ASP.NET Web Pages 2 Developer Preview Tutorials
- Mobile aware web applications with MVC4
- What's New in everything whitepaper
- ASP.NET MVC 4 Page
Download Links
- You likely only need this one download: Visual Studio 11 Developer Preview
- Scott Aside: I am running this side-by-side with Visual studio 2010. I've also been upgrading from internal beta build to this build and you should be able to also. A lot of work has been done to make installing VS less scary. You can certainly run it in a VM but I took the plunge and I'm running them together with no ill effects so far.
- Scott Aside: I am running this side-by-side with Visual studio 2010. I've also been upgrading from internal beta build to this build and you should be able to also. A lot of work has been done to make installing VS less scary. You can certainly run it in a VM but I took the plunge and I'm running them together with no ill effects so far.
- Visual Studio Team Foundation Server 11 Developer Preview
- Visual Studio Agents 11 Developer Preview
- Visual Studio 11 Developer Preview Remote Debugger
- .NET Framework 4.5 Developer Preview
Enjoy!
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
Let's get it on with!
What about 3.5?
Excellent article - very interested in the jQueryRia stuff but links do not seem to work - tried IE & Chrome
Still think the message from MS is not absolutely clear as a Silverlight developer (and as someone who teaches RIA using SL) I think there is plenty of good news from Build but Silverlight does seem like a taboo word these days from MS
Mike
My internet sucks so I am still waiting to see a couple of things (namely, the vs6 conversion, and the MVC improvements, oh and of course the javascript/css integration)
I would go further and have a way to differentiate released/unreleased, supported/unsupported, and "product line". As an example of what I mean by "product line" here's a quote from this blog post: "The WCF RIA Services for Silverlight were also updated via WCF RIA Services V1.0 SP2 and WCF RIA Services Toolkit Aug 2011 update." Are those both released? Supported? Do I already have an earlier version? I see this as very similar to your drive to have reasonable version numbers for releases.
I'd also like a way to "NuGet-ize" an existing project. Iterate my project's references, locate the equivalent NuGet packages, and then present a UI offering to make them NuGet references.
I'd like to start using NuGet, but I don't for these reasons.
I'm running VStudio C# Express 2010 on the Win8 Dev preview (cause I'm an XNA programmer.. And I thought that Xbox Live was being integrated into this dang thing?), but I can't publish my files! I'm getting this weird "Can't find setup.bin" error.. Anyone able to help?
1) Please get the C# team to call the C# compiler that will ship with .Net 4.5 "C# 4.5" instead of "C# 5" :)
2) Is there a chance that NuGet will be shipped in the box with VS11? I wouldn't mind if it stays a VSIX and is updated as it is today, but it would just be great if I knew that EVERY VS11 installation will have NuGet there, unless someone went through the pain to uninstall it.
3) NuGet has its own PowerShell window. It would be nice if at some point VS would have ONE official PowerShell prompt for lots of stuff, and NuGet would just be one of potentially many extensions that plug into that.
run x:\Sources\setup.exe from windows 7 and it will install ontop of windows (optionally keeps old windows folder with simple rename)
This way you don't need to beg borrow or steal a 8GB USB stick.
Only warning. DONT install NVIDIA drivers as windows 8 will crack it!
My expectations are about ASP.NET MVC 4 :) Looks like cool, especially mobile envorionments.
When will release?
One more reason to just turn off all your foolbars and embrace the text editor and code.
Foolbars? I can't tell if that's intentional or a misspelling, but either way I like the new name!
Why not mak Development Stuff a single entry, and all the other stuff sub entries?
"The selected file is a solution file, but was created by a newer version of this application and cannot be opened"
W...T...F.
Open .sln file in notepad, change:
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 11
to
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
FIXED.
Where do I send my invoice?
Brad - Right, because a fresh project is a .NET 4.5 one and VS2010 doesn't know about those.
Jonathan - Dev11 should work just fine side by side. If you are seeing an issue, email me please and I'll get you help.
Steve - Sounds like you are using VS2010, but haven't updated to VS2010SP1? The roundtripping works between dev10sp1 and dev11.
Mike - Ya, I've been telling them that. It's a mess currently.
Thanks but I had almost nothing on my pc and a reimage was faster then more troubleshooting :)
I ran the fx cleanup tool per an MSDN article but that didn't help. I also problem Steve had (before it quite working) and I did have SP1 installed.
I've always enjoyed your blog and your keynotes, keep up the awesomeness.
".NET 4.5 is the right version number"
Why .NET 4.5 instead of .NET 4.1? What if you want to release again as major version 4 before major version 5: what do you call it, .NET 4.75? Or have you already decided that there won't be another major version 4?
Or is this yet another marketing gimmick? Are you afraid that if people only see a single minor point increase that they will think there is nothing substantial in it?
Nevertheless, it's not nearly as bad as the .NET 3.0 or 3.5 versioning fiascos, so I think I'll live :)
Nice post as always. Microsoft.NET 4.5 and other tools look very promising.
Going to install developer preview this week.
Best Regards,
Jalpesh Vadgama
Thanks Scott. I had been waiting for .NET 5, and here comes version 4.5 Beta. The wait is set to end.
When is it being launched?
Any other links to go through for some useful reading material?
Cheers
Vishal Khanna
dotnetuncle.com
and now in market new version 4.5 how can i manage,
Comments are closed.