Could not load file or assembly system.memory version 4.1.0.0
Asked Answered
S

3

5

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.

Shakti answered 10/7, 2018 at 15:19 Comment(2)
anything related to this issue reported here developercommunity.visualstudio.com/content/problem/252454/…Emlen
@Emlen I'm running Visual studio 2017 V15.7.4 and have xamrin installed. According to the link provided it says that it should be fixed in V15.7.3 but I don't think it;s fixed.Shakti
C
3

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.

Cotswold answered 10/7, 2018 at 16:9 Comment(2)
I have downloaded 2.1sdk from this link microsoft.com/net/download/visual-studio-sdks which fixed the issue. Thank you for suggesting for an Upgrade.Shakti
btw, there is a new 2.1 SDK version (2.1.302)Cotswold
V
8

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.

Victualler answered 8/2, 2021 at 19:56 Comment(1)
This was best for me for a winforms framework 4.8 projectQuartermaster
C
3

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.

Cotswold answered 10/7, 2018 at 16:9 Comment(2)
I have downloaded 2.1sdk from this link microsoft.com/net/download/visual-studio-sdks which fixed the issue. Thank you for suggesting for an Upgrade.Shakti
btw, there is a new 2.1 SDK version (2.1.302)Cotswold
F
0

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

Frog answered 31/10, 2024 at 13:9 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.