{"id":36839,"date":"2016-05-16T09:40:48","date_gmt":"2016-05-16T16:40:48","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/webdev\/?p=6895"},"modified":"2016-05-16T09:40:48","modified_gmt":"2016-05-16T16:40:48","slug":"announcing-asp-net-core-rc2","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-asp-net-core-rc2\/","title":{"rendered":"Announcing ASP.NET Core RC2"},"content":{"rendered":"<p><em>Edit:\u00a0 ASP.NET Core RC2 is now available for use with Azure Web Applications<\/em><\/p>\n<p>We are very pleased to announce the availability of ASP.NET Core RC2.\u00a0 This release succeeds the ASP.NET 5 RC1 release and features a number of updates to enhance compatibility with other .NET frameworks and an improved runtime.\u00a0 You can install the RC2 from <a href=\"http:\/\/dot.net\" target=\"_blank\" rel=\"noopener\">http:\/\/dot.net<\/a>.<\/p>\n<h2>What happened to ASP.NET 5?<\/h2>\n<p>This release features the rebranding of ASP.NET 5 to ASP.NET Core.\u00a0 This renaming was made in order to clarify that this is a new framework built from the ground up and not a revision of the existing ASP.NET frameworks.\u00a0 More details can be found <a href=\"https:\/\/blogs.msdn.microsoft.com\/webdev\/2016\/02\/01\/an-update-on-asp-net-core-and-net-core\/\" target=\"_blank\" rel=\"noopener\">on this blog<\/a>.<\/p>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2016\/05\/stackOfReleases.png\"><img decoding=\"async\" class=\"alignright wp-image-6925 size-medium\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2016\/05\/stackOfReleases-300x233-1.png\" alt=\"\" width=\"300\" height=\"233\" \/><\/a>The release contains the RC2 of the .NET Core runtime and libraries.\u00a0 These libraries are everything that ends up in your &#8216;bin&#8217; folder when you deploy an application.\u00a0 The tooling included (command-line tools, project tools, and Visual Studio tools) has been <a href=\"https:\/\/blogs.msdn.microsoft.com\/dotnet\/2016\/05\/06\/net-core-rc2-improvements-schedule-and-roadmap\/\" target=\"_blank\" rel=\"noopener\">declared as a preview 1 release<\/a>.\u00a0 This change allows those developers who are comfortable with using the runtime to move forward with their projects while the ASP.NET Core tools are completed.<\/p>\n<h2>Introducing the .NET CLI<\/h2>\n<p>A key change that occurred between RC1 and RC2 is the introduction of the .NET command-line interface.\u00a0 This tool replaces the dnvm, dnx, and dnu utilities with a single tool that handles the responsibilities of these tools.\u00a0 Get started by executing the command <code>dotnet<\/code> at a command-prompt:<\/p>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2016\/05\/dotnet.png\"><img decoding=\"async\" class=\"aligncenter wp-image-6915 size-mediumlarge\" src=\"\" alt=\"dotnet CLI\" width=\"430\" height=\"350\" \/><\/a><\/p>\n<p>You can learn more about the <a href=\"https:\/\/blogs.msdn.microsoft.com\/dotnet\/2016\/05\/16\/announcing-net-core-rc2\" target=\"_blank\" rel=\"noopener\">.NET CLI on the .NET team blog and their coverage of this update<\/a>.<\/p>\n<h2>ASP.NET Core is a console app<\/h2>\n<p>In RC1 an ASP.NET application was a class library that contained a Startup.cs class. When the DNX toolchain run your application ASP.NET hosting libraries would find and execute the Startup.cs, booting your web application. Whilst the spirit of this way of running an ASP.NET Core application still exists in RC2, it is somewhat different.<\/p>\n<p>As of RC2 an ASP.NET Core application is a .NET Core Console application that calls into ASP.NET specific libraries. What this means for ASP.NET Core apps is that the code that used to live in the ASP.NET Hosting libraries and automatically run your startup.cs now lives inside a Program.cs. This alignment means that a single .NET toolchain can be used for both .NET Core Console applications and ASP.NET Core applications. It also means that customers have more obvious control over the code that hosts and runs their ASP.NET Core app:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-6935 size-full\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2016\/05\/staticVoidMain-1.png\" alt=\"Program - Main in ASP.NET default template\" width=\"659\" height=\"300\" \/><\/p>\n<p>In this code snippet, from the Main method of an ASP.NET Core RC2 app, is responsible for configuring and running the app. If, for example, you want your application to listen on a particular port or IP address then you can use the WebHostBuilder to do it.<\/p>\n<p>This migration from a class library that is designed to be run on the DNX to a console application with a Program.cs and a Main method that can be run by a new .NET toolchain is one of the most significant changes that RC2 brings to ASP.NET Core.<\/p>\n<h2>IIS Support Baked In<\/h2>\n<p>IIS is a tremendous web server and we continue to provide first-class support for it.\u00a0 Use the new ASP.NET Core Module in your web.config (it\u2019s added in the new project templates) to configure IIS to launch and host your application.<\/p>\n<pre>&lt;configuration&gt;\n&lt;system.webServer&gt;\n\n  &lt;handlers&gt;\n    &lt;add name=\"aspNetCore\" path=\"*\" verb=\"*\" modules=\"AspNetCoreModule\" resourceType=\"Unspecified\"\/&gt;\n  &lt;\/handlers&gt;\n\n  &lt;aspNetCore processPath=\"%LAUNCHER_PATH%\"\n              arguments=\"%LAUNCHER_ARGS%\"\n              stdoutLogEnabled=\"false\"\n              stdoutLogFile=\".logsstdout\"\n              forwardWindowsAuthToken=\"false\"\/&gt;\n&lt;\/system.webServer&gt;\n&lt;\/configuration&gt;\n<\/pre>\n<h2>How do I migrate from RC1 to RC2?<\/h2>\n<p>With these changes to the underlying framework and the branding changes, there are a number of updates that you will need to make to your applications to make them RC2-ready.\u00a0 We have written the following guides to help you update:<\/p>\n<ul>\n<li><a href=\"http:\/\/dotnet.github.io\/docs\/core-concepts\/dnx-migration.html\" target=\"_blank\" rel=\"noopener\">Migrating from DNX to .NET Core<\/a><\/li>\n<li><a href=\"https:\/\/docs.asp.net\/en\/latest\/migration\/rc1-to-rc2.html\" target=\"_blank\" rel=\"noopener\">Migrating from ASP.NET 5 RC1 to ASP.NET Core 1.0 RC2<\/a><\/li>\n<li><a href=\"https:\/\/docs.efproject.net\/en\/latest\/miscellaneous\/rc1-rc2-upgrade.html\">Migrating your Entity Framework Code from RC1 to RC2<\/a><\/li>\n<\/ul>\n<h2>Can I use RC2 with Azure Web Applications?<\/h2>\n<p>Yes, Azure Web Applications have full support for deploying ASP.NET Core RC2 apps.\u00a0 More details are available on the <a href=\"https:\/\/blogs.msdn.microsoft.com\/appserviceteam\/2016\/05\/24\/azure-app-service-and-asp-net-core-rc2%20\" target=\"_blank\" rel=\"noopener\">Azure blog<\/a>.<\/p>\n<h2>Summary<\/h2>\n<p>There are a number of other changes that occurred in order to clear up, fix, or simplify APIs during the RC2 development process.\u00a0 There are also a number of performance enhancements that were committed in this release, most notable are those that significantly improve the throughput of the Kestrel web server.\u00a0 As always, you can find clear documentation of all ASP.NET Core RC2 changes in our <a href=\"https:\/\/github.com\/aspnet\/announcements\/issues?q=is%3Aopen+is%3Aissue+milestone%3A1.0.0-rc2\" target=\"_blank\" rel=\"noopener\">Announcements repository on GitHub<\/a>.\u00a0 Please <a href=\"http:\/\/dot.net\" target=\"_blank\" rel=\"noopener\">download a copy of ASP.NET Core RC2<\/a> today and give it a try.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Edit:\u00a0 ASP.NET Core RC2 is now available for use with Azure Web Applications We are very pleased to announce the availability of ASP.NET Core RC2.\u00a0 This release succeeds the ASP.NET 5 RC1 release and features a number of updates to enhance compatibility with other .NET frameworks and an improved runtime.\u00a0 You can install the RC2 [&hellip;]<\/p>\n","protected":false},"author":405,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197,7509],"tags":[30,7265],"class_list":["post-36839","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aspnet","category-aspnetcore","tag-announcement","tag-announcements"],"acf":[],"blog_post_summary":"<p>Edit:\u00a0 ASP.NET Core RC2 is now available for use with Azure Web Applications We are very pleased to announce the availability of ASP.NET Core RC2.\u00a0 This release succeeds the ASP.NET 5 RC1 release and features a number of updates to enhance compatibility with other .NET frameworks and an improved runtime.\u00a0 You can install the RC2 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/36839","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/405"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=36839"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/36839\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=36839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=36839"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=36839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}