System.Net.Http NuGet package 4.3.0 reference generates System.IO.FileLoadException on System.Diagnostics.DiagnosticSource ver 4.0.0.0 reference

前端 未结 3 1671
失恋的感觉
失恋的感觉 2021-02-12 23:04

Description of the problem:

A shared library \"shared.dll\" project references System.Net.Http NuGet package 4.3.0. The application that references \"shared.dll\" fails

3条回答
  •  一个人的身影
    2021-02-12 23:22

    In my case the

    FileLoadException: Could not load file or assembl y 'System.Diagnostics.DiagnosticSource, Version=4.0.3.0, Culture=neutral, Public KeyToken=cc7b13ffcd2ffffd51'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

    started when to Asp.Net Core 2.0 project was added Microsoft.AspNetCore.TestHost package "2.1.0-preview2-final". The fix was to install the stable version "2.0.2"

提交回复
热议问题