{"id":36885,"date":"2017-03-07T13:00:15","date_gmt":"2017-03-07T21:00:15","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/webdev\/?p=9345"},"modified":"2017-03-07T13:00:15","modified_gmt":"2017-03-07T21:00:15","slug":"announcing-visual-studio-2017","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-visual-studio-2017\/","title":{"rendered":"Announcing New ASP.NET Core and Web Development Features in Visual Studio 2017"},"content":{"rendered":"<p>We are pleased to announce updates to our ASP.NET tools, ASP.NET Core tools, Container tools, and frameworks that are shipping as part of the Visual Studio 2017 release today.\u00a0 We have made significant updates to the web development tools to make them easier for you to use and help make you more productive in your daily web development tasks.<\/p>\n<h2>ASP.NET Core Tooling<\/h2>\n<p>As part of this release, we are including an RTM version of the ASP.NET Core tools. \u00a0Visual Studio 2015 included preview tooling based on project.json that supported the 1.0 and 1.1 versions of the ASP.NET Core framework. Visual Studio 2017 and it\u2019s .csproj tooling is the tooling for ASP.NET Core moving forward. Customers should plan to migrate their applications to the new .csproj tooling. With Visual Studio 2017, we have delivered updates that complete the experience for ASP.NET Core developers.\u00a0 ASP.NET Core is available in the Web and .NET Core sections of new projects: <figure id=\"attachment_9455\" aria-labelledby=\"figcaption_attachment_9455\" class=\"wp-caption aligncenter\" ><img decoding=\"async\" src=\"\" alt=\"File - New - Project\" class=\"wp-image-9455 size-mediumlarge\" width=\"500\" height=\"347\" \/><figcaption id=\"figcaption_attachment_9455\" class=\"wp-caption-text\">File &#8211; New &#8211; Project<\/figcaption><\/figure> \u00a0 The new ASP.NET Core project template screen has some minor updates, and still makes available the choice of three web templates: Empty, API, and Web Application <figure id=\"attachment_9375\" aria-labelledby=\"figcaption_attachment_9375\" class=\"wp-caption aligncenter\" ><img decoding=\"async\" src=\"\" alt=\"New Project Template\" class=\"wp-image-9375 size-mediumlarge\" width=\"500\" height=\"326\" \/><figcaption id=\"figcaption_attachment_9375\" class=\"wp-caption-text\">New Project Template<\/figcaption><\/figure> You can now choose to use ASP.NET Core 1.0 or 1.1 using the combo-box at the top of the screen.\u00a0 Additionally, you can choose to add Container support to your project with the checkbox at the bottom-left of the screen.\u00a0 This option adds: * Docker files to your project for building Container images * a Docker Compose project to define how you instance your Containers * Multi-project\/container debugging support for Containers. <figure id=\"attachment_9385\" aria-labelledby=\"figcaption_attachment_9385\" class=\"wp-caption aligncenter\" ><img decoding=\"async\" src=\"\" alt=\"Default Web Application Project Structure\" class=\"size-mediumlarge wp-image-9385\" width=\"149\" height=\"350\" \/><figcaption id=\"figcaption_attachment_9385\" class=\"wp-caption-text\">Default Web Application Project Structure<\/figcaption><\/figure> We are now shipping templates with the following features: * <a href=\"https:\/\/bower.io\">Bower<\/a> enabled by default, delivering the bootstrap, jQuery, and jQuery validation libraries and added to the wwwroot\/lib folder by default. * We removed the package.json file for npm integration * We removed gulpfile.js file for JavaScript task processing. Existing projects using npm, grunt, or gulp will continue to enjoy the features we added for those frameworks, including the npm package management experience and the Task Runner Explorer. npm, Gulp, and Grunt features can still be added and enabled on new projects.\u00a0 We now ship with a bundleconfig.json that activates the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=MadsKristensen.BundlerMinifier\">simplified resource bundler<\/a>.\u00a0 More information about configuring the bundler can be found on the <a href=\"https:\/\/github.com\/madskristensen\/BundlerMinifier\/wiki\">extension\u2019s GitHub wiki<\/a>.<\/p>\n<h2>.NET Core csproj Support<\/h2>\n<p>Starting with Visual Studio 2017 and the .NET Core SDK 1.0 release, we exclusively support the updated MSBuild file format.\u00a0 If you have an older project that uses the project.json format, it will be converted to the new format the first time you open it with Visual Studio 2017. In the csproj project file for your project you will notice a dramatic simplification of the project references.<\/p>\n<p> \nIn particular, the project file now has the following features activated by default:<\/p>\n<ul>\n<li>An \u201cSdk\u201d attribute on the Project root-element that is set to \u201cMicrosoft.NET.Sdk.Web\u201d. This instructs the project system to manage this project with tooling to support an ASP.NET Core project that delivers a web endpoint with appropriate defaults.<\/li>\n<li>A collection of \u201cPackageReference\u201d elements. These items are NuGet packages that should be installed and referenced by our project.\u00a0 The packages.config file is no longer needed.<\/li>\n<li>A collection of \u201cDotNetCliToolReference\u201d elements. These items enhance the dotnet command-line tool to give it features necessary to build and manage this project.\u00a0 In the sample above, it enables the Entity Framework tools and the User Secret manager.<\/li>\n<\/ul>\n<h2>New DotNet New Templates<\/h2>\n<p>The dotnet command-line tool has new templates for the creation of new .NET Core projects.\u00a0 When you run \u201cdotnet new\u201d now, you will see a selection of templates that you can choose from: <figure id=\"attachment_9395\" aria-labelledby=\"figcaption_attachment_9395\" class=\"wp-caption aligncenter\" ><img decoding=\"async\" src=\"\" alt=\"dotnet new templates\" class=\"size-mediumlarge wp-image-9395\" width=\"500\" height=\"157\" \/><figcaption id=\"figcaption_attachment_9395\" class=\"wp-caption-text\">dotnet new templates<\/figcaption><\/figure> This now makes it very easy to understand the project templates that are available, and the languages that are supported for each.\u00a0 Additionally, it is very easy to create your own templates or download other templates to use.\u00a0 Instructions for building your own templates are on the <a href=\"https:\/\/github.com\/dotnet\/templating\/wiki\/%22Runnable-Project%22-Templates\">project templates wiki<\/a>.\u00a0 An <a href=\"https:\/\/blogs.msdn.microsoft.com\/dotnet\/2017\/02\/07\/announcing-net-core-tools-updates-in-vs-2017-rc\/\">in-depth walk-through of the dotnet new experience<\/a> can be found on the .NET Blog.<\/p>\n<h2>Debug Your Applications with Google Chrome<\/h2>\n<p>Visual Studio has supported client-side JavaScript debugging with Internet Explorer for a long time.\u00a0 With Visual Studio 2017, you can now add the Google Chrome browser to the list of supported client-side debuggers.\u00a0 If you use Google Chrome as your browser at Debug time, you will be able to hit breakpoints and step through the JavaScript and TypeScript code executing in the browser.\u00a0 More details about this feature are in the <a href=\"https:\/\/blogs.msdn.microsoft.com\/webdev\/2016\/11\/21\/client-side-debugging-of-asp-net-projects-in-google-chrome\/\">client-side debugging announcement blog post<\/a>.<\/p>\n<h2>Container Tooling Updates<\/h2>\n<p>Containers are now easier than ever to use with your projects in Visual Studio 2017.\u00a0 For your ASP.NET Core projects, you can choose to add Docker container support at project creation time, and you can also add Docker support to your existing projects by right-clicking on the project in the Solution Explorer and choosing the Add \u2013 Docker Support menu option. To make it easier to work with single and multiple projects, we moved the docker-compose configuration to a separate project in your solution explorer. <figure id=\"attachment_9425\" aria-labelledby=\"figcaption_attachment_9425\" class=\"wp-caption aligncenter\" ><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2017\/03\/docker-compose-1.png\" alt=\"Docker Compose Project\" class=\"size-full wp-image-9425\" width=\"491\" height=\"346\" \/><figcaption id=\"figcaption_attachment_9425\" class=\"wp-caption-text\">Docker Compose Project<\/figcaption><\/figure> If you want to debug your project inside of the container, set the docker-compose project as the startup project.\u00a0 You can still set your project as the startup project and debug on your local machine without effecting any containers. Since we are using a standard docker-compose file, you are free to add other containers into the mix that should be launched when you debug your solution.\u00a0 Add your favorite database, load-balancer, or other service images into your docker-compose to allow you to work with those resources while you debug your ASP.NET application. Those additional containers may be written in other languages, but you can still instance them during your debugging session. When compiling your code, you can now build your solution directly in a Docker container, representing how your build system can compile your code. Running the following code will volume mount your solution, execute \u201cdotnet restore\u201d and \u201cdotnet publish\u201d in the container, generating the compiled output to place in your optimized Docker images.<\/p>\n<pre>docker-compose -f docker-compose.ci.build.yml up<\/pre>\n<h2>ASP.NET with Windows Container Support<\/h2>\n<p>We didn\u2019t limit our support for Docker containers to only the ASP.NET Core projects, we\u2019ve added support for ASP.NET (.NET Framework) applications as well.\u00a0 You can use the same commands to add Windows container support to your favorite ASP.NET Web Forms, MVC, or Web API projects easily.\u00a0 These applications will launch and run inside of a Windows container that is configured with IIS and the latest version of the .NET Framework.<\/p>\n<p> \nBefore you can run .NET Framework in Windows Containers locally, make sure that you have the latest version of<\/p>\n<p><a href=\"https:\/\/store.docker.com\/editions\/community\/docker-ce-desktop-windows?tab=description\">Docker for Windows<\/a> and that you have switched to Windows Containers using the Docker systray icon.<\/p>\n<h2>Publish Your Application<\/h2>\n<p>When it comes time to publish your application, you will find a greatly improved experience when you choose the Publish action on your project. <figure id=\"attachment_9415\" aria-labelledby=\"figcaption_attachment_9415\" class=\"wp-caption aligncenter\" ><img decoding=\"async\" src=\"\" alt=\"Publish Your Project\" class=\"size-mediumlarge wp-image-9415\" width=\"500\" height=\"194\" \/><figcaption id=\"figcaption_attachment_9415\" class=\"wp-caption-text\">Publish Your Project<\/figcaption><\/figure> You can now choose to publish to the following locations: * Azure App Service, including Linux Container Deployments (if Docker is enabled for your ASP.NET Core project) * IIS, FTP * A folder * An Azure Virtual Machine If you have your application configured with Docker support, the publish option will allow you to publish your application as a container to your own Azure Container Registry and deploy to Azure App Service Linux using containers. <figure id=\"attachment_9416\" aria-labelledby=\"figcaption_attachment_9416\" class=\"wp-caption aligncenter\" ><img decoding=\"async\" src=\"\" alt=\"Options for Publication to Azure App Service\" class=\"size-mediumlarge wp-image-9416\" width=\"467\" height=\"350\" \/><figcaption id=\"figcaption_attachment_9416\" class=\"wp-caption-text\">Options for Publication to Azure App Service<\/figcaption><\/figure> Publishing to your own container registry makes it easier for you to re-use your container to deploy new versions or more instances easily.<\/p>\n<h2>Recommended Visual Studio Extensions<\/h2>\n<p>There are two extensions that we recommend adding to your Visual Studio 2017 installation to assist with ASP.NET Core application development:<\/p>\n<ul>\n<li>The <a href=\"https:\/\/aka.ms\/projfiletools\">Project File Tools extension<\/a> provides intellisense for NuGet packages when hand-editing a csproj file<\/li>\n<li>The <a href=\"https:\/\/aka.ms\/razorlangsvc\">Razor Language Service<\/a> provides intellisense, syntax highlighting, and tooltip support for ASP.NET Core Razor Tag Helpers in Visual Studio 2017 To learn more about ASP.NET Core and Razor Tag Helpers, see the <\/li>\n<\/ul>\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/aspnet\/core\/mvc\/views\/tag-helpers\/intro\">Intoduction to Tag Helpers in ASP.NET Core<\/a>\u00a0on the doc.microsoft.com website. To create your own custom Tag Helpers, see <a href=\"https:\/\/docs.microsoft.com\/en-us\/aspnet\/core\/mvc\/views\/tag-helpers\/authoring\">Introduction to Authoring Tag Helpers in ASP.NET Core<\/a>. Additionally, the new <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=MadsKristensen.WebExtensionPack2017\">Web Essentials 2017 extension pack<\/a> includes both of these extensions and a number of other helpful tools for any web developer.<\/p>\n<h2>Summary<\/h2>\n<p>Visual Studio 2017 is here and has the tools you need to be an effective web developer with ASP.NET, ASP.NET Core, and Docker container support.\u00a0<\/p>\n<p><a href=\"https:\/\/visualstudio.com\">Visual Studio Community<\/a> is available for free to hobbyists and small companies with limitations, download a copy and get started being a more productive web developer today.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are pleased to announce updates to our ASP.NET tools, ASP.NET Core tools, Container tools, and frameworks that are shipping as part of the Visual Studio 2017 release today.\u00a0 We have made significant updates to the web development tools to make them easier for you to use and help make you more productive in your [&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-36885","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aspnet","category-aspnetcore","tag-announcement","tag-announcements"],"acf":[],"blog_post_summary":"<p>We are pleased to announce updates to our ASP.NET tools, ASP.NET Core tools, Container tools, and frameworks that are shipping as part of the Visual Studio 2017 release today.\u00a0 We have made significant updates to the web development tools to make them easier for you to use and help make you more productive in your [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/36885","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=36885"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/36885\/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=36885"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=36885"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=36885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}