小编Pro*_*Dev的帖子

Orleans 7.0 序列化程序无法与源自 Nuget 包的 POCO 一起使用

我有一个 Orleans 7.0 项目,并且我遇到了新的默认序列化器的问题。

\n

Orleans 3.6.5 中的旧序列化程序运行良好,它可以序列化几个内部 Nuget 包中的所有模型和 Dtos。

\n

现在在 Orleans 7.0 中,该项目无法识别 Nuget 包中的模型,并且出现以下错误:

\n
Orleans.Serialization.CodecNotFoundException: Could not find a copier for type InternalProject.Model.\n\xc2\xa0\xc2\xa0 at Orleans.Serialization.Serializers.CodecProvider.ThrowCopierNotFound(Type type) in /_/src/Orleans.Serialization/Serializers/CodecProvider.cs:line 666\n\xc2\xa0\xc2\xa0 at Orleans.Serialization.Serializers.CodecProvider.GetDeepCopier[T]() in /_/src/Orleans.Serialization/Serializers/CodecProvider.cs:line 300\n\xc2\xa0\xc2\xa0 at Orleans.Serialization.ServiceCollectionExtensions.CopierHolder`1.get_Value() in /_/src/Orleans.Serialization/Hosting/ServiceCollectionExtensions.cs:line 203\n\xc2\xa0\xc2\xa0 at Orleans.Serialization.GeneratedCodeHelpers.OrleansGeneratedCodeHelper.GetService[TService](Object caller, ICodecProvider codecProvider) in /_/src/Orleans.Serialization/GeneratedCodeHelpers/OrleansGeneratedCodeHelper.cs:lin\ne 75\n\xc2\xa0\xc2\xa0 at OrleansCodeGen.InternalProject.Model.Copier_SpecificModel..ctor(ICodecProvider codecProvider) in C:\\Projects\\InternalProject.Model\\Orleans.CodeGenerator\\Orleans.CodeGenerator.Orle\nansSerializationSourceGenerator\\InternalProject.Model.orleans.g.cs:line 20736\n\xc2\xa0\xc2\xa0 at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)\n\xc2\xa0\xc2\xa0 at System.Reflection.ConstructorInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)\n\xc2\xa0\xc2\xa0 at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] …
Run Code Online (Sandbox Code Playgroud)

c# orleans .net-7.0

4
推荐指数
1
解决办法
1388
查看次数

标签 统计

.net-7.0 ×1

c# ×1

orleans ×1