UserSecrets error after upgrading to 2.2.0
See original GitHub issueUpgrading 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:
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:6
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
dr3s is correct Install-Package Microsoft.Extensions.Configuration.UserSecrets fixed it for my project(s)