Cysharp / MemoryPack

Zero encoding extreme performance binary serializer for C# and Unity.
MIT License
3.29k stars 193 forks source link

Installing version 1.9.14 into Unity using git url couse an error #155

Closed IgorTime closed 1 year ago

IgorTime commented 1 year ago

Library\PackageCache\com.cysharp.memorypack@cd7a8f71b4\Runtime\MemoryPack.Core\MemoryPackWriter.Unmanaged.cs(1244,349): error CS0103: The name 'Unsafe' does not exist in the current context

It looks like it can't fing System.Runtime.CompilerServices.Unsafe.dll which contains in .unitypackage version

neuecc commented 1 year ago

The dependency managed DLL System.Runtime.CompilerServices.Unsafe/6.0.0 is included with unitypackage. For git references, you will need to add them in another way as they are not included to avoid unnecessary dependencies; either extract the dll from unitypackage or download it from the NuGet page.

abenfante commented 1 year ago

Hi! I have the same problem, but I still don't know how to fix it. Can you explain it in more detail? I'm not very knowlegeable in .net and NuGet. Is installing the package from visual studio supposed to be enough? (project > manage nuget packages)

neuecc commented 1 year ago

Click Download Package https://www.nuget.org/packages/System.Runtime.CompilerServices.Unsafe/6.0.0 image

rename .nupkg to .zip lib -> netstandard2.0 -> System.Runtime.CompilerServices.Unsafe.dll