在6月30日微软发布了ASP.NET 5 Beta5,咱们能够从http://nuget.org上获取Beta5 的packages。html
随着VS2015RC发布的ASP.NET 5的版本号是Beta4,因此你必定想在你的项目里使用这个更新。Beta5上不但修正了以前的一些问题并有了不少改进,并且还新增了不少功能。git
很重要一点,咱们应该知道有ASP.NET的运行时(用来运行你的网络应用)和Visual Studio上Web 工具(好比HTML、JavaScript编辑器和新文件对话框)。Beta5是对ASP.NET 5运行时的更新。github
ASP.NET 5 能够运行在全功能的.NET库和核心库。.NET核心库可以运行在Windows,Azure,Linux和Mac上。是时候开始安装beta5并应用到你的ASP.NET 5项目中去。json
下面是Beta 5的一些亮点:windows
.NET执行环境(DNX)api
ASP.NET 5服务器
@Json.Serialize(Model)
[Route("Products/[action]", Name = "[actions]Products")] public class ProductsController { public void Add() { } public void Buy() { } }
<img asp-file-version="true" src="~/images/my_cool_image.png" />
<a asp-action="Edit" asp-route-id="@index">Edit</a>
[TargetElement("a", Attributes = ActionAttributeName)] [TargetElement("a", Attributes = ControllerAttributeName)] [TargetElement("a", Attributes = FragmentAttributeName)] [TargetElement("a", Attributes = HostAttributeName)] [TargetElement("a", Attributes = ProtocolAttributeName)] [TargetElement("a", Attributes = RouteAttributeName)] [TargetElement("a", Attributes = RouteValuesDictionaryName)] [TargetElement("a", Attributes = RouteValuesPrefix + "*")] public class AnchorTagHelper : TagHelper { private const string ActionAttributeName = "asp-action"; private const string ControllerAttributeName = "asp-controller"; private const string FragmentAttributeName = "asp-fragment"; private const string HostAttributeName = "asp-host"; private const string ProtocolAttributeName = "asp-protocol"; private const string RouteAttributeName = "asp-route"; private const string RouteValuesDictionaryName = "asp-all-route-data"; private const string RouteValuesPrefix = "asp-route-"; private const string Href = "href"; ... }
从上面能够看出,该TagHelper会应用到A tag上,而且这个tag上须要有asp-action, asp-controller, asp-fragment, asp-host, asp-protocol, asp-route, asp-all-route-data和asp-route-*这些attributes中一个或一个以上,不然该tag就会绑定到该TagHelper。好比网络
<a href="http://www.cnblogs.com/liontone/">上善若水</a>
就不会被应用上AnchorTagHelper。框架
你们能够在这里看到比较关于Beta5的详细的信息以及关于Beta5已知的问题。后续也会有更多的beta版本发布知道最终正式发布为止。asp.net
Beta5和Visual Studio 2015 RC是兼容的,你能够利用Visual Studio 2015 RC来打开、编译和运行基于Beta5运行库的ASP.NET 5应用。
在Visual Studio 2015RC上升级到Beta5须要作一下几步:
在beta5还有一些break changes,更详细的信息请参考Beta5 Release Note,但愿你们可以喜欢Beta5。