title: How to use user secrets in a dotnet core test project
body: <p>I want to store a database connection string for my integration tests as a user secret. My project.json looks like this:</p>
  
  <pre><code>{
    ...
  
    "dependencies": {
      ...
      "Microsoft.Extensions.Configuration.UserSecrets": "1.1.0"        
    },
  
    "tools": {
      "Microsoft.Extensions.SecretManager.Tools": "1.1.0-preview4-final"
    },
  
    "userSecretsId": "dc5b4f9c-8b0e-4b99-9813-c86ce80c39e6"
  }
  </code></pre>
  
  <p>I've added the following to the constructor of my test class:</p>
  
  <pre><code>IConfigurationBuilder configurationBuilder = new ConfigurationBuilder()
      .AddJsonFile("appsettings.json")
      .AddUserSecrets();
  </code></pre>
  
  <p>However when I run the tests the following exception is thrown when it hits that line:</p>
  
  <pre><code>An exception of type 'System.InvalidOperationException' occurred in Microsoft.Extensions.Configuration.UserSecrets.dll but was not handled in user code
  
  Additional information: Could not find 'UserSecretsIdAttribute' on assembly 'dotnet-test-nunit, Version=3.4.0.0, Culture=neutral, PublicKeyToken=null'.
  </code></pre>
  
  <p>Have I missed something or is what I'm trying to do not supported?</p>