What happens
VirtoCommerce Platform fails to start with:
Unhandled exception. System.TypeLoadException: Could not load type
'Microsoft.AspNetCore.Builder.IISServerOptions' from assembly
'Microsoft.AspNetCore.Server.IIS, Version=10.0.0.0, Culture=neutral,
PublicKeyToken=adb9793829ddae60'
or build with
The type or namespace name 'IISServerOptions' could not be found
Note: Docker containers are not affected — only environments where .NET 10 is installed via a system package manager (such as apt).
Why
Linux distros (Ubuntu, Fedora, etc.) ship source-built .NET packages. Due to a dependency that can’t be compiled in source-build mode (dotnet/aspnetcore#50685), the IIS module is compiled as a 17 KB stub missing most types — including IISServerOptions.
This is a known, still-open issue:
-
dotnet/aspnetcore#63783 —
IISServerOptionsand other IIS APIs missing from source-build -
dotnet/aspnetcore#65931 — Windows-only reference assemblies are empty on Ubuntu
-
dotnet/source-build#5344 — API differences tracker between Microsoft and source-built SDKs
Microsoft no longer publishes .NET 10 to their own package feed for Ubuntu 24.04+ (docs), so apt only gets the broken source-built version.
How to fix
Install Microsoft-built .NET 10 via the official install script:
curl -L https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 10.0
This installs to ~/.dotnet by default. Then add to both ~/.profile and ~/.bashrc:
# Microsoft .NET
export DOTNET_ROOT="$HOME/.dotnet"
[[ ":$PATH:" != *":$DOTNET_ROOT:"* ]] && export PATH="$DOTNET_ROOT:$DOTNET_ROOT/tools:$PATH"
Re-login or source ~/.bashrc, then verify:
dotnet --version # should show 10.x from ~/.dotnet, not /usr/bin