Unit Test User Secrets

Configuration

  • Right Click on Project, “Manage NuGet Packages”
  • Search for and install “Microsoft.Extensions.Configuration.UserSecrets”
  • Right Click on Project, “Manage User Secrets”
  • Add a test secret such as
    {
      "Secret1": "Value1"
    }
    

Initialization