SAIF.NetCore.WindowsService dependencies¶
This library takes a single internal NuGet dependency, on the foundation-layer SAIF.NetCore.ServiceContracts, plus four Microsoft.Extensions.Hosting-family packages for Generic Host support; it makes no outbound API calls of its own, relying entirely on services a consumer resolves from the DI container at runtime.
Internal dependencies¶
| Dependency | Reference Type | Usage |
|---|---|---|
| SAIF.NetCore.ServiceContracts | NuGet Package (same-repo) | Supplies IServiceTaskRunner, IWindowsServiceErrorHandler, ISaifWindowsServiceLogService, and ShutdownExemptExceptionType, which ServiceProgramRunnerBase and ServiceWorker<T> depend on and resolve from the DI container. |
External dependencies¶
| Dependency | Version | Usage |
|---|---|---|
| Microsoft.Extensions.Configuration.Binder | 8.0.0 | Supplies IConfiguration.GetValue<int?>, used to read the DelayStart startup-delay setting. |
| Microsoft.Extensions.Hosting | 8.0.0 | Supplies Host.CreateDefaultBuilder, IHost.Run, and IHost.StopAsync, used to build and run the Generic Host. |
| Microsoft.Extensions.Hosting.Abstractions | 8.0.0 | Supplies BackgroundService, IHost, and IHostBuilder, the base types for ServiceWorker<T> and the host-building API. |
| Microsoft.Extensions.Hosting.WindowsServices | 8.0.0 | Supplies .UseWindowsService(), used by CreateHostBuilder to run the host under the Windows Service Control Manager. |
Dependency risks and notes¶
- The library makes no outbound API calls of its own (no
HttpClientuse and no hard-coded URLs); all outbound HTTP comes from services it resolves but does not implement — the Logging API call made by the consumer-suppliedISaifWindowsServiceLogService(implemented bySAIF.NetCore.Logging) and any logging/error-reporting path inside the resolvedIWindowsServiceErrorHandler(implemented bySAIF.NetCore.ErrorHandler) — so those calls are documented in the Logging and ErrorHandler libraries' own dependency pages, not here. CreateHostBuilderappendsAddJsonFile("appsettings.json", optional: true)andAddEnvironmentVariables()after the configuration sourcesHost.CreateDefaultBuilderalready registers; because later sources win,appsettings.jsoncan override environment-specific settings and unprefixed environment variables can override command-line arguments*.- The library requires five services it does not register —
IServiceTaskRunner(consumer-supplied),IWindowsServiceErrorHandler,ISaifWindowsServiceLogService,IEnvironmentClient, andIHttpJsonClient— and in practice a consumer satisfies the latter four by also referencingSAIF.NetCore.ServiceExtensionsand callingRegisterForWindowsService/RegisterForWindowsService<T>, though an equivalent manual registration of the same four contracts is also possible without that call. ServiceProgramRunnerBase.ServiceHostis a static, process-global reference, so only one host per process is supported; aServiceWorker<T>hosted outside aServiceProgramRunnerBase-derived program fails with aNullReferenceExceptionon its first non-exempt task error*.net10.0is one of this library's two target frameworks, but it is compiled against8.0.0Microsoft.Extensions.*packages, and thenet8.0target reaches end-of-support 2026-11-10.- The csproj's
<DocumentationFile>is a stale, pre-mono-repo absolute path (C:\tfsgit\Framework.NCore.WindowsService\SAIF.NetCore.WindowsService\SAIF.NetCore.WindowsService\SAIF.NetCore.WindowsService.xml), so the checked-in XML doc is not refreshed by current builds, and whether the packed.nupkgstill includes XML documentation is unverified. - This library has no in-repo consumer and no test project, so its dependency surface is unverified against a real consumer in this repository.
Related documentation¶
- Index
- Overview
- Architecture
- Configuration
- Operations and processes
- Business rules
- Service registration
- API reference
Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.
Sources¶
src/SAIF.NetCore.WindowsService/SAIF.NetCore.WindowsService/SAIF.NetCore.WindowsService/ServiceWorker.cssrc/SAIF.NetCore.WindowsService/SAIF.NetCore.WindowsService/SAIF.NetCore.WindowsService/ServiceProgramRunnerBase.cssrc/SAIF.NetCore.WindowsService/SAIF.NetCore.WindowsService/SAIF.NetCore.WindowsService/SAIF.NetCore.WindowsService.csproj