---
title: SAIF.Framework.Windows dependencies
summary: Internal and external dependencies for this library.
status: draft
owner: <owner>
last_reviewed: 2026-09-15
library: SAIF.Framework.Windows
reference_type: package
---

# SAIF.Framework.Windows dependencies

`SAIF.Framework.Windows` has zero `<ProjectReference>` elements — every dependency is consumed via `packages.config`/`<Reference>` NuGet package references — and depends most significantly on `SAIF.Framework.Core` for the `IEnvironmentService`/`IUserProfileService` contracts and on `SAIF.Framework.Data.NHibernate` for the unit-of-work/factory types that back its Oracle and SQL Server data-access composition subsystem.

## Internal dependencies

| Dependency | Reference Type | Usage |
| --- | --- | --- |
| [SAIF.Framework.Core](../saif-framework-core/overview.md) (v2.0.22075.1) | NuGet Package | Supplies `IEnvironmentService` (`SAIF.Core.Services`, consumed by `ProgramRunnerBase.Run()` for `GetApplicationTrack()` and by `DatabaseConfig.RegisterUnitOfWork` for `GetConfigSetting(EnvironmentConfigKey)`) and `IUserProfileService` (`SAIF.Core.Services.UserProfile`, resolved in `ProgramRunnerBase.Run()` to print the current user). |
| SAIF.Framework.Data.NHibernate (v2.0.22076.3) | NuGet Package | Supplies `IUnitOfWork`, `IUnitOfWorkFactory`, `IRepositoryFactory`, `NHibernateUnitOfWork`, `OracleConfigurationFactory`, `SqlServerConfigurationFactory`, `OracleUnitOfWorkFactory`, `OracleStatelessUnitOfWorkFactory`, and `SqlServerUnitOfWorkFactory` — registered by `DatabaseConfig.RegisterUnitOfWorkFactories`/`RegisterUnitOfWork` under the `"oracle"`, `"oracleStateless"`, and `"sqlSever"` Autofac factory names. |
| SAIF.Framework.Common (v2.0.22074.3) | NuGet Package | Supplies `IConsoleLogService`, `ILogWriter`, `LogType`, `Enforce`, `Reflector`, `ValidationResult`/`ValidationFailure`, and extension methods (`ForEach`, `ToStringAll`, `GetFullFormattedException`, `IsNull`, `GetPropertyInfo`, `SetPropertyValue`) used throughout the logging, argument-resolution, and DI-registration subsystems. |
| SAIF.HashUtil (v2.0.22082.2) | NuGet Package | Declared as a project/nuspec dependency; no direct call site found in this library's scanned source. |
| SAIF.Web.API.Clients / SAIF.Web.API.Core (v2.0.22082.1) | NuGet Package | Declared as project dependencies; no direct call site found in this library's scanned source. |

## External dependencies

| Dependency | Version | Usage |
| --- | --- | --- |
| Autofac | 3.5.2 | DI container (`ContainerBuilder`, `IComponentContext`) used directly by `ProgramRunnerBase` and `AutofacExtensions` to compose and resolve the application, environment service, log service, and unit-of-work registrations. |
| FluentValidation | 5.5.0.0 | Referenced via `packages.config`; no direct call site found — the validation surface actually used (`ValidationResult`/`ValidationFailure`) is sourced from `SAIF.Framework.Common`, not `FluentValidation` types directly. |
| log4net | 2.0.5 | Referenced via `packages.config`; no direct call site found in this library's own code. |
| Newtonsoft.Json | 8.0.3 | Referenced via `packages.config`; no direct call site found in this library's own code. |
| RestSharp | 106.12.0 | Referenced via `packages.config`; no direct call site found in this library's own code. |

## Transitive dependencies

Dependencies in this section are inherited from dependency framework libraries. They are not directly referenced by this library but are required at runtime through framework packages.

| Dependency | Source framework | Type | Usage |
| --- | --- | --- | --- |
| NHibernate (v4.0.3.4000) | SAIF.Framework.Data.NHibernate | Transitive | Underlying ORM engine behind the `NHibernateUnitOfWork`/factory types this library registers; no direct class usage in this library's own code beyond the factory/unit-of-work types. |
| FluentNHibernate (v2.0.1.0) | SAIF.Framework.Data.NHibernate | Transitive | Fluent mapping support for the NHibernate stack backing `OracleConfigurationFactory`/`SqlServerConfigurationFactory`; no direct call site in this library's own code. |
| Iesi.Collections (v4.0.1.4000) | SAIF.Framework.Data.NHibernate | Transitive | NHibernate-dependency collection library; no direct call site in this library's own code. |
| Oracle.ManagedDataAccess (v21.5.0) | SAIF.Framework.Data.NHibernate | Transitive | Oracle ADO.NET driver underlying the `"oracle"`/`"oracleStateless"` unit-of-work factories; no direct call site in this library's own code. |

## Dependency risks and notes
- **Fixed environment-service implementation**: `AutofacExtensions.RegisterCommonDependencies` unconditionally registers the external `WindowsEnvironmentService` `As<IEnvironmentService>()` — a consuming application cannot swap the implementation without a subsequent overriding registration (last-registration-wins in Autofac), making the concrete environment-service dependency an architectural fixed point rather than a per-environment configurable choice.
- **No fallback for `EnvironmentConfigKey`**: `DatabaseConfig.EnvironmentConfigKey` has no default value, and `AutofacExtensions.RegisterCommonDependencies` enforces only `currentUserId != null` ([BR-WIN-013](business-rules.md#br-win-013-registercommondependencies-requires-non-null-currentuserid)) — it does not enforce that a supplied `DatabaseConfig.EnvironmentConfigKey` is non-null/non-empty, so a missing key is passed straight through to `IEnvironmentService.GetConfigSetting`, with behavior determined entirely by the external `WindowsEnvironmentService` implementation.
- **No secure/encrypted settings used by this library**: this library performs no credential retrieval of its own; database credentials are embedded in whatever `DbConnectionManager.GetConnectionStringForInstance`/`GetConnectionStringForSqlServer` (external, `SAIF.Services.Common`) return, based on the plain-text `UserName` constructor argument.
- **`"sqlSever"` factory name typo preserved verbatim**: the SQL Server unit-of-work factory is registered under the misspelled name `"sqlSever"` (not `"sqlServer"`) — this is confirmed source behavior, not a documentation error, and any consuming/dependent code must reference the same misspelled name.
- **Nuspec/package-reference mismatch (open question)**: `SAIF.Framework.Windows.nuspec` declares `<dependency>` entries on `SAIF.Framework.Common`, `SAIF.Framework.Data.NHibernate`, `SAIF.HashUtil`, and `SAIF.Web.API.Clients`, but omits `SAIF.Framework.Core` and `SAIF.Web.API.Core` even though both are referenced in the `.csproj`/`packages.config`. Whether this is intentional (transitive re-export via another package's own nuspec chain) or an oversight is unverified.*
- **Unused internal package references**: `SAIF.HashUtil` and `SAIF.Web.API.Clients`/`SAIF.Web.API.Core` are referenced by the project but have no observable call site in this library's own scanned source; their purpose is unknown — possibly vestigial or present only for nuspec/`IncludeReferencedProjects` re-export to consumers.**
- **`SAIF.Services`/`SAIF.Services.Common` bundled dependency**: `ServiceRegistrations.RegisterCoreServicesForWindows` and `DbConnectionManager` (external, `SAIF.Services.Common`) are consumed by `AutofacExtensions.RegisterCommonDependencies` and `OracleConfig`/`SqlServerConfig` respectively, but are bundled with the packages above rather than appearing as an independent `packages.config` entry — their internal configuration/connection-string construction logic is outside this library's repository boundary and not traceable here.

> **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.

## Related documentation
- [Index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Configuration](configuration.md)
- [Operations and processes](operations-processes.md)
- [Business rules](business-rules.md)
- [API reference](api/index.md)

## Sources
- `Console\SAIF.Console\SAIF.Framework.Windows.csproj`
- `Console\SAIF.Console\SAIF.Framework.Windows.nuspec`
- `Console\SAIF.Console\packages.config`
- `Console\SAIF.Console\app.config`
- `Console\SAIF.Console\Console\AutofacExtensions.cs`
- `Console\SAIF.Console\Console\DatabaseConfigs\DatabaseConfig.cs`
- `Console\SAIF.Console\Console\DatabaseConfigs\OracleConfig.cs`
- `Console\SAIF.Console\Console\DatabaseConfigs\SqlServerConfig.cs`
- `Console\SAIF.Console\Console\ProgramRunnerBase.cs`
