Skip to content

Conversation

@eerhardt
Copy link
Member

@eerhardt eerhardt commented Jan 6, 2022

Backport of #63415 to release/6.0

Customer Impact

Customer reported break from 5.0. In 5.0, a developer could use the "User Secrets" functionality without modifying a "Worker" templated app. In 6.0.0, we made packaging changes that caused the "User Secrets" functionality no longer work out of the box. The developer would have to directly reference the Microsoft.Extensions.Configuration.UserSecrets package in order for it to work.

Regression

Yes. 5.0 worked correctly. 3.1 had this same problem, but we re-broke it in 6.0.

Testing

Manually tested the produced packages (Hosting and UserSecrets) work correctly to add the attribute when the project only references Hosting.

Risk

Low risk in that this only moves the build logic to be used whenever the package is referenced, even transitively. In 6.0.0, the build logic was only used when the package was referenced directly.


When Microsoft.Extensions.Configuration.UserSecrets is referenced transitively, for example through Extensions.Hosting, the UserSecretsIdAttribute isn't getting added to the built assembly. This is because the logic is contained in a build folder which is excluded by the dependency from Extensions.Hosting.

The fix is to move the logic to buildTransitive, so it gets picked up by NuGet.

Note, we also need to service the Extensions.Hosting package so it references the new UserSecrets version by default.

Fix #63246

When Microsoft.Extensions.Configuration.UserSecrets is referenced transitively, for example through Extensions.Hosting, the UserSecretsIdAttribute isn't getting added to the built assembly. This is because the logic is contained in a `build` folder which is excluded by the dependency from Extensions.Hosting.

The fix is to move the logic to `buildTransitive`, so it gets picked up by NuGet.

Note, we also need to service the Extensions.Hosting package so it references the new UserSecrets version by default.

Fix dotnet#63246
@ghost ghost assigned eerhardt Jan 6, 2022
@ghost
Copy link

ghost commented Jan 6, 2022

Tagging subscribers to this area: @dotnet/area-extensions-hosting
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #63415 to release/6.0

Customer Impact

Customer reported break from 5.0. In 5.0, a developer could use the "User Secrets" functionality without modifying a "Worker" templated app. In 6.0.0, we made packaging changes that caused the "User Secrets" functionality no longer work out of the box. The developer would have to directly reference the Microsoft.Extensions.Configuration.UserSecrets package in order for it to work.

Regression

Yes. 5.0 worked correctly. 3.1 had this same problem, but we re-broke it in 6.0.

Testing

Manually tested the produced packages (Hosting and UserSecrets) work correctly to add the attribute when the project only references Hosting.

Risk

Low risk in that this only moves the build logic to be used whenever the package is referenced, even transitively. In 6.0.0, the build logic was only used when the package was referenced directly.


When Microsoft.Extensions.Configuration.UserSecrets is referenced transitively, for example through Extensions.Hosting, the UserSecretsIdAttribute isn't getting added to the built assembly. This is because the logic is contained in a build folder which is excluded by the dependency from Extensions.Hosting.

The fix is to move the logic to buildTransitive, so it gets picked up by NuGet.

Note, we also need to service the Extensions.Hosting package so it references the new UserSecrets version by default.

Fix #63246

Author: eerhardt
Assignees: -
Labels:

area-Extensions-Hosting

Milestone: -

@eerhardt eerhardt added the Servicing-consider Issue for next servicing release review label Jan 6, 2022
@leecow leecow added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Jan 6, 2022
@leecow leecow added this to the 6.0.2 milestone Jan 6, 2022
@eerhardt
Copy link
Member Author

eerhardt commented Jan 6, 2022

runtime (Libraries Test Run release coreclr windows x64 Debug) failures are #62068 and #58898

@danmoseley
Copy link
Member

@eerhardt ready to merge?

@eerhardt
Copy link
Member Author

eerhardt commented Jan 7, 2022

ready to merge?

Yes. The only test failure is #62068.

@safern safern merged commit a8b733b into dotnet:release/6.0 Jan 7, 2022
@eerhardt eerhardt deleted the Backport63415 branch January 7, 2022 18:55
@ghost ghost locked as resolved and limited conversation to collaborators Feb 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Extensions-Hosting Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants