Error: Could not load signature of System.IO.Pipelines.BufferSegment:SetOwnedMemory

Hello,

I am developing a project in Unity. I have imported different nuget packages in Unity. But for most of the packages I am getting this error. Did anyone face this problem before? Please let me know how can I resolve this problem.

I am running on API Compatibility Level .Net 4.x

  • Error: Could not load signature of System.IO.Pipelines.BufferSegment:SetOwnedMemory due to: Could not resolve type with token 0100001c (from typeref, class/assembly System.Buffers.IMemoryOwner1, System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a) assembly:System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:System.Buffers.IMemoryOwner1 member:(null) signature:

  • Error: Could not load signature of Microsoft.Extensions.Logging.LoggerFactory:ApplyFilters due to: Could not resolve type with token 0100002b (from typeref, class/assembly System.ValueTuple2, System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a) assembly:System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:System.ValueTuple2 member:(null) signature:

  • Error: Could not load signature of Microsoft.Extensions.Hosting.BackgroundService:ExecuteAsync due to: Could not resolve type with token 01000015 (from typeref, class/assembly System.Threading.Tasks.Task, System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a) assembly:System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:System.Threading.Tasks.Task member:(null) signature:

  • Error: Could not load signature of Microsoft.Extensions.FileProviders.Physical.PhysicalDirectoryInfo:CreateReadStream due to: Could not resolve type with token 0100002f (from typeref, class/assembly System.IO.Stream, System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a) assembly:System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:System.IO.Stream member:(null) signature:

  • Error: Could not load signature of Microsoft.Extensions.Configuration.FileConfigurationProvider:Load due to: Could not resolve type with token 0100001a (from typeref, class/assembly System.IO.Stream, System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a) assembly:System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:System.IO.Stream member:(null) signature:

  • Error: Could not load signature of Microsoft.AspNetCore.Connections.ConnectionBuilderExtensions:Use due to: Could not resolve type with token 01000017 (from typeref, class/assembly System.Threading.Tasks.Task, System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a) assembly:System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:System.Threading.Tasks.Task member:(null) signature:

Are those .net Core packages?
no Core doesn’t work with Unity’s Mono, and there are no news about it.

I have solved the problem. The problem was that I have added the dll by downloading through NuGet and added them in Plugins folder inside Unity project. That probably created some dependencies that they were working inside the editor but the dll was unable to find the corresponding package when building the app. That’s why I was getting “Could not load signature” error.

The solution came by using NuGetForUnity that automatically downloads NuGet packages and translates them to unity packages.

I hope this answer may come in handy.

okay, great stuff