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

Alternative given in ObsoleteAttribute of RegisterMvcControllers wrong #730

Open
bender2k14 opened this issue Jun 25, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@bender2k14
Copy link

commented Jun 25, 2019

Describe the bug
I think I found a mistake in the documentation.

The code in this ObsoleteAttribute is supposed to tell you the preferred alternative. It also links to this page that contains more details.

Expected behavior
The linked page shows that the correct code should be

services.AddSimpleInjector(container, options =>
    options.AddAspNetCore().AddControllerActivation());

which compiles for me. I expected the text in the ObsoleteAttribute to correctly tell me this preferred alternative.

Actual behavior
The ObsoleteAttribute suggests this alternative

services.AddSimpleInjector(container, options =>
    options.AddControllerActivation());

but this doesn't compile for me.

@bender2k14 bender2k14 added the question label Jun 25, 2019

@bender2k14

This comment has been minimized.

Copy link
Author

commented Jun 25, 2019

I think the other two ObsoleteAttributes in that file have the same problem.

I can create a PR to resolve this issue.

@dotnetjunkie

This comment has been minimized.

Copy link
Collaborator

commented Jun 25, 2019

Created bug-730 branch.

@dotnetjunkie

This comment has been minimized.

Copy link
Collaborator

commented Jun 25, 2019

Hi @bender2k14,

Thank you for reporting this and thank you for suggesting sending a PR. A PR won't be needed though, as I already pushed a fix. This fix will be release to the next patch or minor release (what comes first).

Thanks again for taking the time to report this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.