Cysharp / MemoryPack

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

Error "is not registered in this provider" #153

Closed vanBassum closed 1 year ago

vanBassum commented 1 year ago

This issue has the same symptoms as #119 I do however already have the right package installed:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net6.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="MemoryPack" Version="1.9.13" />
  </ItemGroup>

</Project>

Code to reproduce:

using MemoryPack;
using System.Collections;

Console.WriteLine("Hello, World!");

var aaa = new Test();
aaa.Name = "ab";

var aea = MemoryPackSerializer.Serialize(aaa);

[MemoryPackable]
public partial class Test
{
    public string Name { get; set; } = "a";
}
neuecc commented 1 year ago

please check the source-generator reference and generated code.

image