dotnet / dotnet/aspnetcore

Error using Microsoft.AspNetCore.SignalR.Client in NetFramework 4.8 - Could not load file or assembly 'System.Net.Http, Version = 4.2.

Open
#63,797 0 comments 0 reactions 0 assignees View on GitHub
area-signalr Author: Migration Bot :robot:
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/Error-using-MicrosoftAspNetCoreSignalR/10684767)._

---
Good night
When using Microsoft.AspNetCore.SignalR.Client in a NetFramework 4.8 wpf application, an error occurs
Microsoft.AspNetCore.SignalR.Client
Could not load file or assembly 'System.Net.Http, Version = 4.2.0.0
I've tried everything and I can't get it to work
![erroNet4.8SignalR.png](https://aka.ms/dc/image?name=B3495cd19d3ec4863ab0d1734e9429e3a638542676439103638_erroNet4.8SignalR.png&tid=3495cd19d3ec4863ab0d1734e9429e3a638542676439103638)

To reproduce the issue:

Create a NetFramework 4.8 project
Add in Nuget Microsoft.AspNetCore.SignalR.Client

Trigger

public DisplayPos(ModelUser Users)
{
user = user;
InitializeComponent();
AddButtons(200);
_mesaSignalRClient = new MesaSignalRClient("http://192.168.2.150:8082/mesaHub"); -> mistake here!
_mesaSignalRClient.OccupiedDesk += OccupiedTableHandler;
}

Any solutions?

---
### Original Comments

#### Feedback Bot on 6/17/2024, 06:43 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

#### Feedback Bot on 10/9/2024, 06:43 PM:

We detected that this issue hasn’t received a lot of activity, votes, or comments in the past 90 days. Based on this, the issues severity and affected area, it’s my experience that this issue is unlikely to get fixed. To improve the situation, consider following best practices for quality problem reports, and giving us more details on how this issue is impacting you.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported setup: a .NET Framework 4.8 WPF project with Microsoft.AspNetCore.SignalR.Client, then inspect the assembly-loading failure at the MesaSignalRClient constructor call. No repository file or test is named; done means identifying a supported package/runtime configuration or a documented resolution for the System.Net.Http version error.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.