{"id":17374,"date":"2018-08-15T15:37:09","date_gmt":"2018-08-15T22:37:09","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/webdev\/?p=14745"},"modified":"2018-08-15T15:37:09","modified_gmt":"2018-08-15T22:37:09","slug":"improvements-in-visual-studio-2017-15-8-for-web-developers","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/improvements-in-visual-studio-2017-15-8-for-web-developers\/","title":{"rendered":"Improvements in Visual Studio 2017 15.8 for web and Azure developers"},"content":{"rendered":"<p>This week we released Visual Studio 2017 version 15.8. Our 15.8 update brings the following improvements for web developers:<\/p>\n<ul>\n<li>Custom docker image tags during Publish<\/li>\n<li>Zip push deployment for Azure Functions<\/li>\n<li>Managing Azure Functions application settings<\/li>\n<li>Enabling Application Insights as part of publishing to Azure App Service<\/li>\n<li>Managing user secrets in ASP.NET Framework projects (targeting .NET 4.7.1 or higher) work projects<\/li>\n<li>Optimizing build performance for solutions containing ASP.NET Frame<\/li>\n<li>Author and source information for ASP.NET Core templates<\/li>\n<\/ul>\n<h2>Custom docker image tags during Publish<\/h2>\n<p>You can now customize the \u201cImage tag\u201d for Docker containers when publishing them to a container registry. The value can either be automatically generated by Visual Studio every time you publish (the previous behavior), or it be manually changed if you need a consistent tag (e.g. \u201clatest\u201d):<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/15.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-14785\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2018\/08\/15-254.png\" alt=\"Screenshot of new property called &quot;Image Tag&quot; in Publish\" width=\"689\" height=\"286\" \/><\/a><\/p>\n<h2>Zip push deployment &amp; run from zip for Azure Functions<\/h2>\n<p>Visual Studio now provides the option to <a href=\"https:\/\/github.com\/Azure\/app-service-announcements\/issues\/84\">deploy and run Azure Functions projects as zip files<\/a>:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/23.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-14795\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2018\/08\/23-254.png\" alt=\"Screenshot of publish and run from zip option in Publish\" width=\"802\" height=\"602\" \/><\/a><\/p>\n<p><a href=\"https:\/\/github.com\/Azure\/app-service-announcements\/issues\/110\">Run-From-Zip<\/a> is a runtime feature that allows &#8216;mounting&#8217; a zip file and running directly from it. Your App runs directly over the &#8216;mounted&#8217; zip file, which completely takes over your\u00a0wwwrootfolder (which becomes read-only).\u00a0 Using run from Zip offers the following benefits:<\/p>\n<ul>\n<li>Atomicity: when your application is deployed as as single unit, and updated as a single unit meaning publishing an update will never leave your app in a partially updated state<\/li>\n<li>Faster deployment of large applications<\/li>\n<li>Improved cold start performance<\/li>\n<\/ul>\n<h2>Managing Azure Functions application settings<\/h2>\n<p>After you publish your Azure Functions project using Visual Studio, you can manage the application settings from the publish summary:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/102.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-14855\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2018\/08\/102-253.png\" alt=\"Screenshot of manage application settings in the publish summary\" width=\"610\" height=\"296\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>That&#8217;s a feature we added back in update 15.5 of Visual Studio 2017. Since then you gave us feedback that a very common task is to copy the local value of a setting to the remove environment. So now in update 15.8 of Visual Studio 2017 that&#8217;s as easy as clicking a button:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/91.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-14865\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2018\/08\/91-254.png\" alt=\"Screenshot of the button that copies the local value of a setting to remote\" width=\"600\" height=\"450\" \/><\/a><\/p>\n<h2>Enabling Application Insights as part of publishing to Azure App Service<\/h2>\n<p>When publishing to Azure App Service, Visual Studio asks you to either create a new App Service or re-use an existing one. If you choose to create a new App Service to host your application, Visual Studio now offers you the ability to also provision and configure Application Insights:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/62.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-14755\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2018\/08\/62-254.png\" alt=\"Screenshot of new drop-down related to Application Insights when creating a new App Service\" width=\"800\" height=\"600\" \/><\/a><\/p>\n<p>All you need to do is pick the region you would like Application Insights to be provisioned in and Visual Studio will make sure it\u2019s configured to pick up telemetry events and metrics from the new App Service. If you wish to add custom events and metrics <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/application-insights\/app-insights-api-custom-events-metrics\">follow this guide<\/a>. Of course, you can always set the field to \u201cNone\u201d and Visual Studio will not provision nor configure Application Insights on your behalf.<\/p>\n<h2>Managing user secrets in ASP.NET Framework projects (targeting .NET 4.7.1 or higher)<\/h2>\n<p>A feature that ASP.NET Framework projects were missing compared to ASP.NET Core was support for storing application secrets (e.g. connection strings, API keys, etc.) in a file outside of source control unique to each user. Now, with <a href=\"https:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=56119\">.NET Framework 4.7.1<\/a> and Visual Studio 15.8 it\u2019s as simple as right clicking on the project in Solution Explorer and selecting \u201cManage User Secrets\u201d:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/33.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-14805\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2018\/08\/33-254.png\" alt=\"Screenshot of the new &quot;Manage user secrets&quot; menu item when right clicking in Solution Explorer\" width=\"524\" height=\"781\" \/><\/a><\/p>\n<p>Visual Studio will take care of the rest including downloading the necessary NuGet packages, updating the web.config file, creating the secrets file on disk and finally opening it for you to edit:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/45.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-14815\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2018\/08\/45-254.png\" alt=\"Screenshot of an example user secrets file\" width=\"491\" height=\"137\" \/><\/a><\/p>\n<p>More info on how to edit this file <a href=\"https:\/\/github.com\/aspnet\/MicrosoftConfigurationBuilders#usersecretsconfigbuilder\">here<\/a>.<\/p>\n<p><strong>Note:<\/strong> Only available for projects targeting .NET Framework 4.7.1 or higher, if you can\u2019t see the menu item make sure you have the <a href=\"https:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=56119\">4.7.1 targeting pack installed<\/a> and that the project is actually targeting 4.7.1, you can change it from project properties:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/52.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-14825\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2018\/08\/52-254.png\" alt=\"Screenshot of the run time drop-down available in project properties\" width=\"807\" height=\"186\" \/><\/a><\/p>\n<h2>Optimizing build performance for solutions containing ASP.NET Framework projects<\/h2>\n<p>We added a new menu item under Build | ASP.NET Compilation | Optimize Build Performance for Solution:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/71.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-14765\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2018\/08\/71-254.png\" alt=\"Screenshot of new menu item Build | ASP.NET Compilation | Optimize Build Performance for Solution\" width=\"709\" height=\"324\" \/><\/a><\/p>\n<p>ASP.NET compiles its views at runtime, which means your ASP.NET project carries with it a copy of the compiler. However, on a developer machine when the copy of the compiler doesn&#8217;t match Visual Studio&#8217;s copy, your build performance is impacted on the order of 1-3 seconds per incremental build. This feature will update your project&#8217;s copy of the compiler to match Visual Studio&#8217;s which should speed up your incremental builds.<\/p>\n<p>This is applicable to ASP.NET Framework projects only, it does not apply to ASP.NET Core.<\/p>\n<h2>Author and source information for ASP.NET Core templates<\/h2>\n<p>The dialog for new ASP.NET Core projects now shows you the author and source for the selected template:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/81.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-14775\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2018\/08\/81-254.png\" alt=\"Screenshot of author and source information available in the New Project Dialog\" width=\"786\" height=\"553\" \/><\/a><\/p>\n<ul>\n<li>If the template is coming from a .NET Core SDK installed on the machine, the dialog will now display the version of the SDK as the source<\/li>\n<li>If the template is coming from a VSIX (i.e. Visual Studio extension) installed on the machine, the dialog will now display the name of the VSIX as the source<\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>If you\u2019re interested in the many other great things that Visual Studio 2017 15.8 brings, check out our <a href=\"https:\/\/blogs.msdn.microsoft.com\/visualstudio\/2018\/08\/14\/visual-studio-2017-version-15-8\/\">Visual Studio 15.8 post<\/a> on the Visual Studio blog.<\/p>\n<p>We hope that you\u2019ll give 15.8 a try and let us know how it works for you. If you run into any issues please report them using Visual Studio, or let us know what you think below, or via Twitter.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With the release of Visual Studio 2017 version 15.8 brings improvements for web developers such as custom docker image tags during publish, zip push deployment for Azure functions, managing Azure functions application settings, and enabling Application Insights as part of publishing to Azure App Service. Also learn about managing user secrets in ASP.NET framework projects, optimizing build performance for solutions containing ASP.NET frame as well as author and source information for ASP.NET Core templates.<\/p>\n","protected":false},"author":405,"featured_media":21385,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197,7509,327,646],"tags":[37,7575,7268],"class_list":["post-17374","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aspnet","category-aspnetcore","category-azure","category-visual-studio","tag-azure","tag-visual-studio-2017-15-8","tag-web"],"acf":[],"blog_post_summary":"<p>With the release of Visual Studio 2017 version 15.8 brings improvements for web developers such as custom docker image tags during publish, zip push deployment for Azure functions, managing Azure functions application settings, and enabling Application Insights as part of publishing to Azure App Service. Also learn about managing user secrets in ASP.NET framework projects, optimizing build performance for solutions containing ASP.NET frame as well as author and source information for ASP.NET Core templates.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/17374","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=17374"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/17374\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/21385"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=17374"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=17374"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=17374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}