ASP.NET 5 beta8 announced

ASP.NET team has announced ASP.NET 5 beta8. You can download ASP.NET 5 beta8 using NuGet Packages and ASP.NET tooling for Visual Studio. You can find installation instruction for ASP.NET 5 beta8 for Windows, Linux, and Mac.

Document and samples of ASP.NET 5 beta8 can be found at http://docs.asp.net

What is an announcement in ASP.NET 5 beta8?

There would be changes like

DNX Watch Command
DNX Watch has file watcher. Your application will be restarted when you change any file in your application. To install DNX-watch use following command

dnu commands install Microsoft.Dnx.Watcher

You can use watch command like dnx-watch . You can start to watch command from the same directory of Project.json

While publishing your application, you can Specify target frameworks
You can specify target framework of application at the time of publishing your application using the following command

dnu publish -framework dnx45

and it will only trim publish package and include only those set of packages that required for your application and
resulting in smaller deployed package.

Targeting old frameworks
Now, you can target .NET 2.0 and .NET 3.5 frameworks in your DNX projects. You just need to specify net20 and net35 into target framework of Project.json file.

Clear HTTP Response Cache used for package response
When restoring packages dnu do HTTP caching for any request send. You can use the following command to clear the cache.

dnu clear-http-cache

DNVM uninstall
Whenever you are keeping updated with your latest DNX releases, you might be in a situation like DNX hanging out your machine. You can find ~/.dnx/runtimes folder into your user profile directory and delete older versions anytime. This is a just tedious task. So now, you can run dnvm uninstall to remove or uninstall specified runtime.

Add additional files to a package
DNX generating NuGet Packages for your projects, but, in that case, you are in a need to add additional files to your package. You can now add additional files to NuGet packages by specifying in project.json using new packInclude property.

"packInclude": {
    "destination1Directory/": "source1Directory/**",
    "destination2Directory/": "source2Directory/**",
    "destination2Directory/some_additional_file.txt": "source2a/somefile.txt",
    "destination3Directory/": ["source3Directory/file1.txt", "source3Directory/file2.txt"]
}

You can specify the set of source and destination directory to include into the package. You can also add files using pattern and array of files.

Run script for each specified framework and creating the package.
With DNX, you can handle multiple framework(like net45,net46 or dnxcore50), and multiple build configuration like debug and release). In project.json you can specify the script that run on before and after each package creation and build. before ASP.NET 5 beta8 script was run twice.

Consider you have two dotnet frameworks and two build configuration say release and debug. Now, your script can run four times once for each framework and once for each build configuration. The prepack and postpack script run twice once for each build configuration.

Change in IIS Hosting model
Up to ASP.NET 5 beta8 application runs in IIS have been hosted by the component called “Helios”, contained in the Microsoft.AspNet.Server.IIS. This component facilitated the bootstrapping of the DNX and subsequently the .NET CLR or Core CLR by way of utilizing a hook in the existing System.Web hosting model to replace the runtime after the application had started.

In ASP.NET 5 beta8, they have discontinued the “Helios” IIS host to reduce complexity and manageability of two hosting environments. Now, Hosting ASP.NET 5 applications in IIS will now be achieved using the IIS HttpPlatformHandler configured to forward through to the ASP.NET 5 Kestrel server. HttpPlatformHandler module is native IIS module hence it needs to be install by Administrator.

One thought on “ASP.NET 5 beta8 announced

  1. Pingback: DNVM (.NET Version Manager) to install ASP.NET 5