InvalidOperationException: Could not find 'UserSecretsIdAttribute' on assembly

后端 未结 3 591
Happy的楠姐
Happy的楠姐 2020-12-10 23:56

After deploying ASP.NET Core app to azure and opening the site, I get the following error:

InvalidOperationException: Could not find \'UserSecretsIdAt

3条回答
  •  臣服心动
    2020-12-11 00:38

    I want to add to this answer, for those in my situation.

    I am writing a .NET Core console app, trying to use the secrets manager (not sure it's meant for console apps). The only way I was able to rid myself of the error was using the assembly level attribute on the assembly where I was using the secrets manager.

    As I said, I am not sure if the secrets manager is meant for console apps. So maybe there is an issue with .xproj files vs. .csproj files.

提交回复
热议问题