Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the transient dependency example for 6.0 #23482

Closed
guardrex opened this issue Oct 7, 2021 · 2 comments Β· Fixed by #23491
Closed

Update the transient dependency example for 6.0 #23482

guardrex opened this issue Oct 7, 2021 · 2 comments Β· Fixed by #23491
Assignees
Labels
Blazor doc-enhancement Pri1 Source - Docs.ms Docs Customer feedback via GitHub Issue

Comments

@guardrex
Copy link
Collaborator

guardrex commented Oct 7, 2021

The Startup πŸ‘‰ Program changes this morning (10/7) will break the 6.0 preview doc for the transient dep example.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@guardrex guardrex self-assigned this Oct 7, 2021
@dotnet-bot dotnet-bot added Blazor Source - Docs.ms Docs Customer feedback via GitHub Issue labels Oct 7, 2021
@guardrex
Copy link
Collaborator Author

guardrex commented Oct 8, 2021

Merely using the 5.0 code in an app generated from the 6.0 project template doesn't seem to even register the service in the first place (i.e., builder.Services.AddTransient<TransientDisposable>();); therefore, there's no service to inject into the component.

If that's an OOB behavior now, then the Detect transient disposables section should be removed and the NOTE in the Utility base component classes to manage a DI scope section can be replaced with a sentence or two about how transients aren't registered by default when dev code attempts to do so.

If it isn't an OOB feature now and something else is going on, I'll need more info and a revised DetectIncorrectUsagesOfTransientDisposables.cs (preferbly with the NRT updates for 6.0) along with any updates to Program.cs for WASM/Server scenarios.

I'll mark this for work post 6.0 RC2 release. In the meantime, I'll remove the section from the 6.0 preview doc so as not to confuse any readers at this time.

@guardrex guardrex added Pri1 and removed Pri0 Urgent priority labels Oct 8, 2021
@guardrex
Copy link
Collaborator Author

guardrex commented Oct 8, 2021

Nevermind! ... I just figured it out. πŸŽ‰

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blazor doc-enhancement Pri1 Source - Docs.ms Docs Customer feedback via GitHub Issue
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants