ISHIDA
ISHIDA

Reputation: 4868

Could not load file or assembly system.memory version 4.1.0.0

I have asp.net core project which runs on Asp.Net Core V2.1.0 which has signal r integrated. I have downloaded a sample project from aspnetbrolerplate. When I try to run the application it gives me following error.

System.IO.FileNotFoundException: 'Could not load file or assembly 'System.Memory, Version=4.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.'

Can anyone please suggest me possible solution for this issue.

Upvotes: 5

Views: 16982

Answers (3)

sham
sham

Reputation: 759

My Project was using 2 different versions of System.Memory.

In my case System.Diagnostics.DiagnosticSource 4.0.5.0 was Referencing System.Memory 4.0.1.1

I upgraded System.Diagnostics.DiagnosticSource nuget package to 8.0.0.1 and this action upgraded System.Memory to 4.0.1.2

Now my project has same version i.e 4.5.5 of System.Memory in my project

After upgrading worked well.

enter image description here

Upvotes: 0

michelle4code
michelle4code

Reputation: 91

I found installing the System.Memory NuGet package resolves the issue.

It is confusing that earliest version is 4.5.1, but if you install it, you will find the assembly versioned a System.Memory, Version=4.1.0.0.

For my .NET Framework project I installed NuGet version 4.5.4 which contains System.Memory, Version=4.0.1.1 assembly.

Upvotes: 9

magicandre1981
magicandre1981

Reputation: 28786

I found that this is a known issue for UWP. Update to Asp.Net Core 2.1.1 and Microsoft.AspNetCore.SignalR.Client NuGet Package to at least 1.0.1, which has a fix for this UWP issue.

Maybe it also fixes your issue.

Upvotes: 3

Related Questions