You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
Hey, I’m currently migrating my projects to .NET Core 2.0 and as part of this, I’ve updated the Microsoft.Extensions.Logging.Console dependency on some test projects to 2.0.
When I run tests that attempt to create a console logger, I get the following error:
Message: System.IO.FileLoadException : Could not load file or assembly 'System.Runtime.InteropServices.RuntimeInformation, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I assume this is related to the change introduced with #440 that got rid of the PlatformAbstractions dependency. It also works fine for me in new-style .csproj projects (including test projects) but it just fails with old-style test projects. For some odd reason, the same code within a console application runs fine, even on old-style projects.
Is there anything I can do to avoid this problem other than upgrading to the newer .csproj format? I’ve also tried referencing various different kinds of InteropServices in the project but I couldn’t get it to work.
I’ve prepared a minimum test project that reproduces the problem over here.