dotnet / dotnet-api-docs

.NET API reference documentation (.NET 5+, .NET Core, .NET Framework)
https://docs.microsoft.com/dotnet/api/
Other
703 stars 1.55k forks source link

Systemd & WindowsServices in Microsoft.Extensions.Hosting are missing in .NET 5, 6, 7 docs #8145

Open CodeCasterNL opened 2 years ago

CodeCasterNL commented 2 years ago

The docs for types and members in Microsoft.Extensions.Hosting.[Systemd|WindowsServices] stopped getting tagged as available in current .NET after having been moved from the Extensions repo.

See for example: https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.hosting.systemdhostbuilderextensions?view=dotnet-plat-ext-6.0, showing a banner:

The requested page is not available for .NET Platform Extensions 6. You have been redirected to the newest product version this page is available for.

Even though the class has been in .NET since .NET Core 3.0. I made a PR adding those versions, but got a reply from @gewarren stating:

It looks like the packages are missing from this file, which is why the documentation hasn't been updated. @carlossanlop Can you look into this and generate a new drop if necessary (or just wait until the Preview 5 drop is generated)?

Since that's a nonpublic repo, can you look into fixing that?

Then, an additional question regarding these Platform Extensions: in which directory should the file WindowsServiceLifetimeHostBuilderExtensions.xml reside, describing a type in the assembly Microsoft.Extensions.Hosting.WindowsServices:

I ask this because the dependency injection extension method (services.UseWindowsService()) is now documented under "Microsoft.Extensions.Hosting", while for example the lifetime (WindowsServiceLifetime) is documented under "Microsoft.Extensions.Hosting.WindowsServices".

dotnet-issue-labeler[bot] commented 2 years ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

ghost commented 2 years ago

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

Issue Details
The docs for types and members in `Microsoft.Extensions.Hosting.[Systemd|WindowsServices]` stopped getting tagged as available in current .NET after [having been moved from the Extensions repo](https://github.com/dotnet/runtime/pull/47686/files). See for example: https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.hosting.systemdhostbuilderextensions?view=dotnet-plat-ext-6.0, showing a banner: > The requested page is not available for .NET Platform Extensions 6. You have been redirected to the newest product version this page is available for. Even though the class has been in .NET since .NET Core 3.0. I [made a PR adding those versions](https://github.com/dotnet/dotnet-api-docs/pull/8141/files), but got a reply from @gewarren stating: > It looks like the packages are missing from [this file](https://github.com/dotnet/api-catalog-infra/blob/main/eng/droplayout.props), which is why the documentation hasn't been updated. @carlossanlop Can you look into this and generate a new drop if necessary (or just wait until the Preview 5 drop is generated)? Since that's a nonpublic repo, can you look into fixing that? Then, an additional question regarding these Platform Extensions: in which directory should the file `WindowsServiceLifetimeHostBuilderExtensions.xml` reside, describing a type in the assembly `Microsoft.Extensions.Hosting.WindowsServices`: * `xml/Microsoft.Extensions.Hosting`, where it's now, according to its namespace, or * `xml/Microsoft.Extensions.Hosting.WindowsServices`, according to its assembly name and source location? I ask this because the dependency injection extension method (`services.UseWindowsService()`) is now documented under "Microsoft.Extensions.Hosting", while for example the lifetime (`WindowsServiceLifetime`) is documented under "Microsoft.Extensions.Hosting.WindowsServices".
Author: CodeCasterNL
Assignees: -
Labels: `untriaged`, `Pri3`, `area-Extensions-Hosting`
Milestone: -
maryamariyan commented 2 years ago

FYI, the WindowsService and Systemd libraries used to live in dotnet/extensions repo and I guess the docs missing has to do with the port to dotnet/runtime.

See https://github.com/dotnet/runtime/pull/47686

KalleOlaviNiemitalo commented 1 year ago

My scenario for wanting this documentation:

My service binds WindowsServiceLifetimeOptions to configuration in order to read ServiceName from appsettings.json. I was writing a JSON schema for the settings of my service and wanted to link to the documentation of WindowsServiceLifetimeOptions.ServiceName, but it is not published at learn.microsoft.com. There is documentation for other types such as WindowsServiceHelpers, but WindowsServiceLifetimeOptions was added in https://github.com/dotnet/extensions/pull/2626 for .NET 5.0, so it is not included in the .NET Platform Extensions 3.1 documentation.