Improvements in Visual Studio 2017 15.8 for web and Azure developers

Jeffrey

August 15th, 2018

This week we released Visual Studio 2017 version 15.8. Our 15.8 update brings the following improvements for web developers:

Custom docker image tags during Publish

Zip push deployment for Azure Functions

Managing Azure Functions application settings

Enabling Application Insights as part of publishing to Azure App Service

Managing user secrets in ASP.NET Framework projects (targeting .NET 4.7.1 or higher) work projects

Optimizing build performance for solutions containing ASP.NET Frame

Author and source information for ASP.NET Core templates

You can now customize the “Image tag” 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. “latest”):

Zip push deployment & run from zip for Azure Functions

Visual Studio now provides the option to deploy and run Azure Functions projects as zip files:

Run-From-Zip is a runtime feature that allows ‘mounting’ a zip file and running directly from it. Your App runs directly over the ‘mounted’ zip file, which completely takes over your wwwrootfolder (which becomes read-only). Using run from Zip offers the following benefits:

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

Faster deployment of large applications

Improved cold start performance

Managing Azure Functions application settings

After you publish your Azure Functions project using Visual Studio, you can manage the application settings from the publish summary:

That’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’s as easy as clicking a button:

Enabling Application Insights as part of publishing to Azure App Service

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:

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’s configured to pick up telemetry events and metrics from the new App Service. If you wish to add custom events and metrics follow this guide. Of course, you can always set the field to “None” and Visual Studio will not provision nor configure Application Insights on your behalf.

Managing user secrets in ASP.NET Framework projects (targeting .NET 4.7.1 or higher)

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 .NET Framework 4.7.1 and Visual Studio 15.8 it’s as simple as right clicking on the project in Solution Explorer and selecting “Manage User Secrets”:

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:

More info on how to edit this file here.

Note: Only available for projects targeting .NET Framework 4.7.1 or higher, if you can’t see the menu item make sure you have the 4.7.1 targeting pack installed and that the project is actually targeting 4.7.1, you can change it from project properties:

Optimizing build performance for solutions containing ASP.NET Framework projects

We added a new menu item under Build | ASP.NET Compilation | Optimize Build Performance for Solution:

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’t match Visual Studio’s copy, your build performance is impacted on the order of 1-3 seconds per incremental build. This feature will update your project’s copy of the compiler to match Visual Studio’s which should speed up your incremental builds.

This is applicable to ASP.NET Framework projects only, it does not apply to ASP.NET Core.

Author and source information for ASP.NET Core templates

The dialog for new ASP.NET Core projects now shows you the author and source for the selected template:

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

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

Conclusion

If you’re interested in the many other great things that Visual Studio 2017 15.8 brings, check out our Visual Studio 15.8 post on the Visual Studio blog.

We hope that you’ll 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.