Skip to content

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions #987

@andreaborraccetti

Description

@andreaborraccetti

Hi
Running dotnet publish on my windows 10 it generates DLLs and it runs without issues.
With the same codebase on a linux container (FROM microsoft/dotnet:2.0.0-sdk) if I run dotnet publish and try to start my application (dotnet mydll.dll) it returns the following error:

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The
 located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
   at Microsoft.AspNetCore.WebHost.CreateDefaultBuilder(String[] args)
...
Aborted

I have also tried to copy the compiled dll manually from windows to the linux container and the application works.

dotnet version windows: 2.0.0
dotnet version linux: 2.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions