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

Wrong line is marked #34197

Open
JKamsker opened this issue Nov 21, 2024 · 0 comments
Open

Wrong line is marked #34197

JKamsker opened this issue Nov 21, 2024 · 0 comments

Comments

@JKamsker
Copy link

JKamsker commented Nov 21, 2024

Description

In the codeblock

using SampleApp.Services;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddRazorPages();

builder.Services.AddWindowsService();
builder.Services.AddHostedService<ServiceA>();

var app = builder.Build();

app.MapRazorPages();

app.Run();

This line is marked:
builder.Services.AddRazorPages();

Which is completely irrelevant to the topic.
The Documentation hints, that those lines are relevant:

builder.Services.AddWindowsService();
builder.Services.AddHostedService<ServiceA>();

Page URL

https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/windows-service?view=aspnetcore-9.0&tabs=visual-studio

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/host-and-deploy/windows-service.md

Document ID

4b60d24e-ef05-15e5-10b4-483094081bf3

Article author

@tdykstra

Related Issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant