Today Scott Hanselman announced the Release Candidate of Visual Studio 2015, Team Foundation Server 2015 and Visual Studio 2013 Update 5. We hope that all //build attendees are enjoying the show, and we are following up on the news of the Visual Studio 2015 Release Candidate to show you some of the cool new features delivered in this version for web developers. With the Visual Studio 2015 release candidate we are delivering updates for ASP.NET 4.6 and our next generation ASP.NET 5 framework. You can read more about ASP.NET 5 online at http://www.asp.net/vnext and review the new open source documentation for ASP.NET 5 at http://docs.asp.net Let’s take a look at the new features delivered in the Visual Studio 2015 release candidate for ASP.NET 4.6 and the ASP.NET 5 beta4 preview:
The Big Rename
If you’ve been following the previous releases of Visual Studio 2015 and the nightly builds of ASP.NET, you have no doubt been familiar with the Project K executables: k.exe, klr.exe, kpm.exe, and kvm.exe In order to drop the Project K codename and move to a more market-friendly name of the ASP.NET tooling, these command-line tools and the K-Runtime were renamed as follows:
- k and klr are now DNX. DNX stands for .NET Execution Environment.
- kvm is now dnvm or the .NET Version Manager
- kpm is migrating some functionality of its functionality to dnu, the .NET Development Utility and some functionality will migrate to be core NuGet functionality
- The Aspnet50 and aspnetcore50 framework monikers in project.json files are being replaced with dnx451 and dnxcore50.
New Project Templates and Project Types
In the prior versions of Visual Studio 2015, we made project types available for Project K class library and Project K console applications. These project type names don’t make sense in our new world and we have renamed them appropriately:
Class Library (Package) is a class library project that is configured to allow you to build reference libraries that compile directly into NuGet packages. Console application is a similar project that allows console applications to be built in the same model as an ASP.NET 5 web application, referencing NuGet packages and configuring multiple frameworks to build against. Both of these project types allow the developer to configure everything with a project.json file and target the .NET Core framework.
We’ve also simplified and updated the ASP.NET web project templates in this release. There are clear dividing lines between the ASP.NET 4.6 and ASP.NET 5 projects, as well as updated templates for a Single Page Application and Azure Mobile Service:
Add Missing NuGet Packages in ASP.NET 5
Our favorite new feature for ASP.NET 5 developers is the cool new feature to help you add the correct NuGet packages to your project for the types that you are referencing. In the ASP.NET 5 environment, all references are NuGet packages, and how will you know which ones to add when you just want to light-up that XDocument type to work with an XML document? In an ASP.NET 5 web project or class library project, you can just press CTRL + . (period) to activate a helper in the editor that will offer to add the missing package to your project:
The editor will suggest the package to add and show you the changes that it is going to make to the Using statements at the top of the code file in order to allow your code to function properly.
Performance Updates for ASP.NET 5
We focused a significant amount of time on improving the performance of the Visual Studio developer experience. In this release, you should see a noticeable speed increase when opening existing solutions with ASP.NET 5 projects as well as launching the application. There are a number of other less important performance tweaks under the hood for ASP.NET 5 projects as well.
Editor Improvements to Support TagHelpers
TagHelpers for ASP.NET MVC were introduced in an earlier preview, but in this release they really come into their own. TagHelpers provide a simple tag experience in the razor editor that allow you to execute code on the server and inject content in the output. Scott Hanselman and Jeff Fritz have posts that introduce and demonstrate how to start writing your first TagHelper. The ASP.NET Community standup discussed TagHelpers in March 2015.
We have added editor support so that you can easily see where your .NET code will take over rendering your HTML. With bold tag names and intellisense support for attributes, coding HTML with these complex server-side interactions has become easier than ever.
Add Reference to Project
We’ve re-introduced the ability to add references to an ASP.NET 5 project from standard class library projects. In the image above, the ClassLibrary1 project is a standard class library, while the TagHelperSample.Helpers project is an ASP.NET 5 specific class library. Both library types are supported interchangeably now.
Cleaned Up Solution Explorer with Automatic File Nesting
With ASP.NET 5, we’ve promoted the fact that ASP.NET developers should start to use more standard web practices for acquiring, minifying, and otherwise processing your static resources before they are served to your web application’s visitors.
To help make the display of minified resources easier to review in your solution explorer, any files with an extension of min.css or min.js will be nested automatically under the un-processed version of that file. We hope that you find this to be a useful addition to the solution explorer.
Local IIS Express Custom Configuration
If you were finding that you were constantly updating your applicationHost.config file on your machine each time you started a new project, then this feature will be a welcome change. With the new ASP.NET tooling, your custom IIS web server configurations are stored in the solution’s .vs folder in an applicationHost.config file. This should help isolate your web server configurations for each of your projects without conflicting references to a single configuration file.
Security Updates for ASP.NET
There are a number of security-focused updates in this release for both ASP.NET 4.6 and ASP.NET 5:
- ASP.NET 4.6
- Updates to templates using “Work And School Account” for Authentication. This also includes fixes to Domain picker used to select your tenant.
- Use Roslyn Code Dom Compilers. The packages are pre-installed in Web Forms Template. They will be added to all 4.6 templates by RTM. You can link to your post about VB or http://blogs.msdn.com/b/webdev/archive/2014/05/12/enabling-the-net-compiler-platform-roslyn-in-asp-net-applications.aspx ?
- ASP.NET 5
- The individual web site authorization template option now allows developers to configure social logins, account confirmation, and two-factor authentication.
- Templates are using Gulp.
- SSL can be configured from web project property pages.
- The ASP.NET authorization library now allows for authorization using policies.
- Web Projects can now be configured to use Windows authentication.
Custom Launch Settings are saved as Project Properties
If you want to lock in the version of the framework that your project for compilation and debugging, those settings are now saved with your project in the new launchSettings.json file in your project properties folder. This means that all of your team members will have the same debugging configuration when they synchronize source code.
Additionally, we have simplified the format of this configuration file to make it easier to read and work with:
ASP.NET 4.6 Improvements
We have a number of updates for ASP.NET 4.6 which includes Web Forms, MVC 5 and Web API 2. These include support for .NET Compiler Platform (Roslyn), hosting changes in IIS to support HTTP/2 and more. Read this post for more details.
We are working on evolving the ASP.NET environment and tooling. This might be a release candidate build for Visual Studio, but we are looking at the big picture for ASP.NET. We will continue to develop at the same pace in the open at http://github.com/aspnet/home. We are building and releasing our libraries and updates for Visual Studio with the updates delivered on NuGet and the Visual Studio Extension Gallery. Keep an eye on our blog to hear about our next set of features.