What happened to my ASP.NET Core project (Visual Studio Key Vault connected service)?

This article identifies the exact changes made to an ASP.NET project when adding the Key Vault connected service using Visual Studio.

For information on working with the connected service, see Getting Started.

Added references

Affects the project file *.NET references and NuGet package references.

Type Reference
NuGet Microsoft.AspNetCore.AzureKeyVault.HostingStartup

Added files

  • ConnectedService.json added, which records some information about the Connected Service provider, version, and a link the documentation.

Project file changes

  • Added the Connected Services ItemGroup and ConnectedServices.json file.

launchsettings.json changes

  • Added the following environment variable entries to both the IIS Express profile and the profile that matches your web project name:

      "environmentVariables": {
        "ASPNETCORE_HOSTINGSTARTUP__KEYVAULT__CONFIGURATIONENABLED": "true",
        "ASPNETCORE_HOSTINGSTARTUP__KEYVAULT__CONFIGURATIONVAULT": "<your keyvault URL>"
      }
    

Changes on Azure

  • Created a resource group (or used an existing one).
  • Created a Key Vault in the specified resource group.