IHostAzure.com :: What’s New In ASP.NET 5

What’s New in ASP.NET 5

ASP.NET 5 is a lean .NET stack for building modern web apps. ASP.NET 5 built it from the ground up to provide an optimized development framework for apps that are either deployed to the cloud or run on-premises. It consists of modular components with minimal overhead, so you retain flexibility while constructing your solutions.

Feature ASP.NET 5

  • New flexible and cross-platform runtime
  • New modular HTTP request pipeline
  • Cloud-ready environment configuration
  • Unified programming model that combines MVC, Web API, and Web Pages
  • Ability to see changes without re-building the project
  • Side-by-side versioning of the .NET Framework
  • Ability to self-host or host on IIS
  • New tools in Visual Studio 2015
  • Open source in GitHub

ASP.NET 5 gives you Greater flexibility by being able to run on three runtimes:

  • Full .NET CLR
    The full .NET CLR is the default runtime for projects in Visual Studio. It provides the entire API set and is your best option for backwards compatibility.
  • Core CLR (cloud-optimized runtime)
    The Core CLR is a lean and completely modular runtime for ASP.NET 5 projects. This CLR has been re-designed into components so you have the flexibility to include only those features that you need in your app. You add the components as NuGet packages. When you are finished, your app is dependent only on required features. By re-factoring the runtime into separate components, we can deliver improvements to the components more quickly because each component is updated on its own schedule. The Core CLR is about 11 megabytes instead of around 200 megabytes for the full .NET CLR. The Core CLR can be deployed with your app and different versions of the Core CLR can run side-by-side (both of these advantages are described in greater detail below).
  • Cross-Platform CLR
    We will release a cross-platform runtime for Linux and Mac OS X. When released, this runtime will enable you to develop and run .NET apps on Mac and Linux devices. We will work closely with the Mono community on this effort. Until its release, you can use the Mono CLR for cross-platform development.

By default, new Visual Studio projects use the full .NET CLR. You can specify the Core CLR in the configuration properties for your project.

Host anywhere

ASP.NET 5 enables you to host your app on IIS or self-host your app in your own process. When you target the Core CLR, you can deploy your app with every dependency bundled within the deployment package. Therefore, your app and its dependencies are completely self-contained and no longer dependent on a system installation of .NET. Any type of device or hosting platform is capable of running the app.

Use different versions of .NET side-by-side

When apps on a server depend on a single, system-wide installation of the .NET Framework, all of the apps have to run the same version of .NET. This situation might have created some anxiety for you when considering whether to upgrade to a new version of the .NET Framework. Perhaps, you wanted some of your apps to use the latest version of .NET but you were unsure whether all of your legacy apps would work appropriately with the new version.

Simplify dependency management

ASP.NET 5 introduces a new, lightweight way to manage dependencies in your projects. You no longer add assembly references to your project instead, you manage dependencies by referencing NuGet packages. You can add NuGet packages through the NuGet Package Manager or you can edit the JSON file (project.json) that lists the NuGet packages and versions used in your project. To add other dependencies, you simply type the name and version number of the NuGet package into your project.json file.

dependenciesIn Visual Studio 2015, IntelliSense assists you with finding the available NuGet packages. The project.json file only includes NuGet packages that you directly added to your project. If you add a NuGet package that is dependent on other packages, those secondary dependencies are loaded but not listed in the project.json file. This approach keeps your project.json file less cluttered and easier to manage. If you remove a NuGet package from project.json, the secondary dependencies are removed too if no other packages need them.

The JSON format makes it easier for you to manage dependencies even when you do not have an available installation of Visual Studio. You can open the project.json file in any type of text editor and make changes, such as updating dependencies for app deployed to the cloud.