Skip to content

IIISEnvironmentFeature could not be found on Ubuntu Linux #670

Description

@radzawee

I'm unable to run migrated web application on Ubuntu Linux with dotnet packages installed from Ubuntu repository (not from Microsoft).
App works fine with dotnet files downloaded manually using Microsoft script, but I prefer to use distro packages mechanism.

Exception:

System.TypeLoadException: Could not load type 'Microsoft.AspNetCore.Server.IIS.IIISEnvironmentFeature' from assembly 'Microsoft.AspNetCore.Server.IIS, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

Reproduction:

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSystemWebAdapters();
var app = builder.Build();
app.UseSystemWebAdapters();
await app.RunAsync();

I'm building against .NET 10.

Packages details:

$ dotnet --list-runtimes
Microsoft.AspNetCore.App 8.0.25 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.4 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.25 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.4 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
$ dpkg -l | grep ii | grep dotnet
ii  dotnet-apphost-pack-8.0               8.0.25-0ubuntu1~24.04.1                 amd64        Internal - targeting pack for Microsoft.NETCore.App 8.0
ii  dotnet-host-10.0                      10.0.4-0ubuntu1~24.04.1                 amd64        .NET host command line
ii  dotnet-hostfxr-10.0                   10.0.4-0ubuntu1~24.04.1                 amd64        .NET host resolver
ii  dotnet-hostfxr-8.0                    8.0.25-0ubuntu1~24.04.1                 amd64        .NET host resolver
ii  dotnet-runtime-10.0                   10.0.4-0ubuntu1~24.04.1                 amd64        .NET runtime
ii  dotnet-runtime-8.0                    8.0.25-0ubuntu1~24.04.1                 amd64        .NET runtime
ii  dotnet-runtime-deps-8.0               8.0.18-1                                amd64        dotnet-runtime-deps-debian 8.0.18
ii  dotnet-targeting-pack-8.0             8.0.25-0ubuntu1~24.04.1                 amd64        Internal - targeting pack for Microsoft.NETCore.App 8.0
ii  dotnet-templates-8.0                  8.0.125-0ubuntu1~24.04.1                amd64        .NET 8.0 templates

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Needs: Triage 🔍Label added to new issues which need Triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions