Microsoft.WindowsAzure.Storage.Table.TableEntity 未标记为可序列化

本文关键字:记为 序列化 TableEntity WindowsAzure Storage Table Microsoft | 更新日期: 2023-09-27 18:18:24

程序集"Microsoft.WindowsAzure.Storage, version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 中的类型"Microsoft.WindowsAzure.Storage.Table.TableEntity"未标记为可序列化。

我正在尝试使用 Redis 缓存,当我尝试在存储对象之前序列化时,我收到上述错误。我已经在网上搜索了它,但没有找到任何解决方案。

我该怎么办?

Microsoft.WindowsAzure.Storage.Table.TableEntity 未标记为可序列化

如存储客户端库版本 4.0.1 的更改日志中所述:

Tables: Removed Serialized attribute and ISerializable implementation from TableEntity. Implement ITableEntity for your custom entities if you need either.

如果您需要序列化属性,请实现 ITableEntity。

据此,该问题已在当前版本中修复:

升级到 Microsoft.WindowsAzure.Storage 4.0.0 后未正确序列化表实体