Visual Studio .NET Standard library and .NET Framework project - NuGet dll manifest definition does not match


I use VS 2019, I have a .NET Standard (2.0) library project named Foo (using ServiceStack NuGet package) and a main .NET Framework (4.7.2) windows service project named Bar (also using ServiceStack NuGet). Bar has a reference to Foo. Bar is a windows service and a ServiceStack REST host, Foo has the DTOs shared across solutions (it needs ServiceStack library for the [Route] attribute).

When I try to run any ServiceStack-related code in Bar, I get:

{"Could not load file or assembly 'ServiceStack.Interfaces, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"ServiceStack.Interfaces, Version=, Culture=neutral, PublicKeyToken=null"} System.IO.FileLoadException

Despite having this entry in Bar's app.config (I use the publicKeyToken from Bar's .csproj):

    <assemblyIdentity name="ServiceStack.Interfaces" publicKeyToken="02c12cbda47e6587" culture="neutral" />
    <bindingRedirect oldVersion="" newVersion="" />

How can I make those two work together?


Both ServiceStack NuGet packages in Foo and Bar have version 5.5.0 (the .NET Framework's .dll "version" as seen in VS properties is I have tried with and without a publicKeyToken, I've tried mapping oldVersion="" newVersion="" and oldVersion="" newVersion="".

The actual .dll in the output folder has this full name: ServiceStack.Interfaces, Version=, Culture=neutral, PublicKeyToken=02c12cbda47e6587

asked on Stack Overflow Jul 19, 2019 by user1713059 • edited Jul 19, 2019 by user1713059

1 Answer


You can search for "ServiceStack multi-target" to view answers that address this issue like this answer.

In summary, if you only want to Run ASP.NET Core Apps on the .NET Framework you can only reference .Core packages otherwise if you want to be able to mix both .NET Standard and .NET Framework projects together in the same solution you need to multi-target.

answered on Stack Overflow Jul 19, 2019 by mythz

User contributions licensed under CC BY-SA 3.0