Thursday, November 2, 2017

.NET Core SignalR Client error: System.IO.FileLoadException: Could not load file or assembly 'System.Runtime.InteropServices.RuntimeInformation

To test a .NET Core SignalR application, I created a sample application(using the full .NET framework) where I included the Microsoft.AspNetCore.SignalR.Client NuGet package and added the following code:

However when I tried running this application, it failed with the following error message:

System.IO.FileLoadException: Could not load file or assembly 'System.Runtime.InteropServices.RuntimeInformation, Version=, 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 checked all my assembly references but they all seemed OK.

As a workaround, I was able to avoid the issue by removing the .WithConsoleLogger() line. Anyone who has an idea what can be wrong?

Remark: I think it has to do something with the SignalR client which targets .NET Standard 2.0 and my sample application wich targets .NET Framework 4.7. But no clue what exactly is causing it…


meenumaga said...

Actually your giving information is very useful to me so keep more updates
Business Tax Return
Cpa Tax Accountant
Tax Return Services

swathi said...

Really i like this blog and i got lot of information's from your blog.And thanks for sharing!!!!
Human resources management software
cctv camera installation in Chennai
RFID Solutions

jabashree said...

Thanks for sharing this valuable information.I have read your blog and i got a very useful and knowledgeable information from your blog.You have done a great job.

SAP Training Institute in Chennai
SAP ABAP Training in Chennai
SAP FICO Training in Chennai
SAP MM Training in Chennai
SAP Training in Chennai