question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UserSecrets error after upgrading to 2.2.0

See original GitHub issue

Upgrading to 2.2.0 my test project with user secrets broke with the following error

Message: System.AggregateException : One or more errors occurred.
---- System.InvalidOperationException : Could not find 'UserSecretsIdAttribute' on assembly 'Doc.AspNetCore.CommonTests'.
Check that the project for 'Doc.AspNetCore.CommonTests' has set the 'UserSecretsId' build property.
If the 'UserSecretsId' property is already set then add a reference to the Microsoft.Extensions.Configuration.UserSecrets package.

but I do have a UserSecretsId and the Microsoft.Extensions.Configuration.UserSecrets package as a direct dependency.

The only change in 2.2.0 that seemed related was:

https://github.com/aspnet/Configuration/pull/872

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:6

github_iconTop GitHub Comments

3reactions
dr3scommented, Dec 7, 2018

Note that this is the same error as when using 2.1.1 and not including Microsoft.Extensions.Configuration.UserSecrets package as a direct dependency of the test project.

However, once Microsoft.Extensions.Configuration.UserSecrets package is made a direct dependency of the test project the test runs.

2reactions
rkreiselcommented, Mar 6, 2019

dr3s is correct Install-Package Microsoft.Extensions.Configuration.UserSecrets fixed it for my project(s)

Read more comments on GitHub >

github_iconTop Results From Across the Web

No Manage User Secrets for console apps
CreateDefaultBuilder() , sets up local user secrets. There's no option for managing these when right clicking on the project file so you ...
Read more >
Detected package downgrade: Microsoft.NETCore.App ...
I am on .NET 5 and looks like this bug is still there. Issue: Unable to update EntityFramework package from 5.0.5 to 5.0.8....
Read more >
Migrate from ASP.NET Core 2.0 to 2.1
This article provides an overview on migration to ASP.NET Core 2.1. It doesn't contain a complete list of all changes needed to migrate...
Read more >
ServiceStack v5.13.2
Basically if you encounter a build error after upgrading you'll need to add a *Fields suffix to the UpdateOnly method name. Lets go...
Read more >
Microsoft.TeamsFx 2.2.0-rc
Right click project file and choose "Manage User Secrets". Change key name "CLIENT_SECRET" to "TeamsFx:Authentication:ClientSecret". Upgrade from 1.1.0 to 1.2.0 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found