Quantcast
Channel: ASP.NET Blog
Viewing all articles
Browse latest Browse all 7144

ASP.NET 5 Beta5 Now Available

$
0
0

This week we released ASP.NET 5 Beta5 as an in-place update to Visual Studio 2015 RC on http://nuget.org!

The version that shipped with VS2015RC was Beta4 so you’ll definitely want toget this update. ASP.NET 5 Beta5 is loaded with lots of new features, improvements, and bug fixes.

It’s important to remember that there’s the ASP.NET runtime (the bits that run your web apps) and there is the Web Tooling bits for Visual Studio (the bits that give you the HTML and JavaScript editor and the File New Dialog Box). Beta5 is an update to the ASP.NET 5 runtime!

Remember that ASP.NET 5 runs on both the full .NET Framework and also (still a work in progress) .NET Core. It’s .NET Core that will run on Windows, Azure, Linux, and Mac. It’s important to note that ASP.NET runs on both these frameworks, so this is a good time to start installing the betas and trying out your applications with ASP.NET 5.

Here are just some of the highlights from this release:

.NET Execution Environment (DNX)

  • Support for NuGet v3 feeds. Restoring packages using the new NuGet v3 feed is significantly faster - try it out by adding https://api.nuget.org/v3/index.json as a package source.
  • Support for the new dotnet Target Framework Moniker (TFM). You can now use DNX to build portable .NET libraries that work on any .NET flavor that supports your package dependencies using the new dotnet TFM. We will provide more details on using the new dotnet TFM for package authoring in a future post.
  • Specify language and release notes link in project.json. These nuspec properties can now be specified in your project.json file.
  • Removed JSON.NET version pinning. This is an important change that we are introducing as it no longer requires that your application use the same version of JSON.NET that is shipped with the DNX version that you are working with.  As JSON.NET evolves, you can choose to download and install new releases without being required to upgrade the DNX version you are using.
  • New IRuntimeEnvironment service. Use the new IRuntimeEnvironment service to get runtime details, like OS, CLR, and bitness.

ASP.NET 5

  • HttpContext.Connection. Added connection information to HttpContext via the new Connection property.
  • New localization abstractions and middleware. You can see the new abstractions in action in this localization sample.
  • Consistent way to terminate ASP.NET hosting. Previously ASP.NET hosting would terminate on any key press. We now consistently terminate on Ctrl-C.

MVC 6

  • C# 6 support in Razor. You can learn more about the new features available in C# 6 at MSDN blogs.
  • Simplified MVC options and added top level settings. There are now app-level settings for configuring various settings for HTML helpers
  • New JSON helper for serializing JSON in views. This helper allows you to serialize your .NET objects to JSON in Razor views very easily with syntax like the following:

@Json.Serialize(Model)

  • Attribute routing token replacement in route names. In addition to using route tokens in route templates you can now use them in route names, like this:
[Route("Products/[action]", Name = "[actions]Products")]
public class ProductsController
{
    public void Add() { }
    public void Buy() { }
}
  • New ImageTagHelper. The new ImageTagHelper allows you to automatically append image filenames with a cache-buster version number so that you can aggressively cache images with your application, like this:

<img asp-file-version="true" src="~/images/my_cool_image.png" />

  • Tag helper support for binding dictionary properties. You can now bind server side attributes to dictionary properties on your tag helpers. For example, the AnchorTagHelper binds route values for link generation using attributes that follow the asp-route-* pattern, like this:

<a asp-action="Edit" asp-route-id="@index">Edit</a>

  • Support conditionally binding tag helpers based on presence of server-side attributes. You can now specify that tag helper should only be bound to a tag based on the presence of server-side attributes using the Attributes property on TargetElementAttribute.

Be sure to read the Beta5 release notes to find all the details on what’s new as well as known issues. There will be more Betas after this one as we march towards a final release. The final release of ASP.NET 5 will happen AFTER Visual Studio 2015 is released. We’ll announce the schedule very soon.

As I said previously, this ASP.NET 5 runtime update is compatible with Visual Studio 2015 RC. You can open, build and run ASP.NET 5 apps using the Beta5 runtime packages and Visual Studio 2015 RC.

To update to ASP.NET 5 Beta5 use the following steps:

  • Install the .NET Version Manager (DNVM) if you don’t already have it (it comes preinstalled with Visual Studio 2015 RC, or you can get the latest version)
  • From a command prompt set the DNX_FEED environment variable to https://www.nuget.org/api/v2
  • Run “dnvm upgrade”
  • In your app update your global.json to point to eta5 version of the .NET Execution Environment (DNX)
  • Also your project.json to point to the beta5 ackage versions
  • Run “dnu restore”
  • Run “dnu build” and migrate your code to beta5 s needed

There have been quite a few API changes in this release as part of a broad API review. In the process we refactored many of our packages to reduce dependencies and to improve the layering. To help you update your Beta4 code you can find a list of the most impactful changes on our Announcements repo along with details for each change. You can also find docs and samples for ASP.NET 5 at http://docs.asp.net.

We hope you enjoy this release! If you find any issues or have suggestions for improvement please let us know through our public issues trackers on GitHub. Thanks for trying out ASP.NET 5!

Please join us every Tuesday for the ASP.NET Community Standup. The schedule and previous episodes are at http://www.asp.net/vnext.

 


Viewing all articles
Browse latest Browse all 7144

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>