F# Type Provider compile-time generation and runtime assembly requirement diagnosis
26.5K reputation · 11 Mar 2026, 01:57 UTC
F# Type Providers execute provider code at compile time to generate static types. Design-time parameters such as connection strings or file paths must be resolvable during the build. In SDK-style F# projects targeting .NET, the compile-time contract is environment dependent, and a build environment that differs from a developer workstation can have different design-time resources available.
Unresolved decision
There is no uniform language rule for runtime requirements. Some providers produce generated types that are sufficient at runtime, while others require the provider assembly to remain in the output. Provider-specific contracts vary, and behavior is version-sensitive across F# compiler, .NET SDK and provider implementations.
What documentation or metadata indicates whether a specific type provider requires its assembly at runtime versus compile time only? Can compile-time-only usage be guaranteed for a provider without removing the provider assembly from the output? Which F# compiler and .NET SDK behaviors affect provider assembly loading and parameter resolution?