How to use user secrets in a dotnet core test project
See instructions in https://patrickhuber.github.io/2017/07/26/avoid-secrets-in-dot-net-core-tests.html, in particular in InitialiseTest add // the type specified here is just so the secrets library can // find the UserSecretId we added in the csproj file var builder = new ConfigurationBuilder().AddUserSecrets<HttpClientTests>(); Configuration = builder.Build() However note that it will not allow to run tests on build server