【问题标题】:Converting resources file to resx - not serializable将资源文件转换为 resx - 不可序列化
【发布时间】:2013-06-20 00:41:27
【问题描述】:

我有一个任务,我正在重建一些我们在许多项目中丢失的资源。大多数情况下,它都很好,但当然在最后一个项目中,我遇到了一个我找不到任何解决方案的错误。

我使用 Reflector 8.1 对 DLL 进行反编译,它为我提供了所有源代码和一堆 .resources 文件。我一直在使用 resgen 程序将它们转换回 .resx 文件以包含在项目中。一个文件让我很伤心。请帮忙。

>resgen foo.resources foo.resx
Read in 106 resources from "foo.resources"
ResGen : error RG0000: Error while writing the output file "Resources.resx"
ResGen : error RG0000: Specific exception: "InvalidOperationException"  Message: "Item        named 'IncomingRing' of type 'System.IO.PinnedBufferMemoryStream' cannot
be added to the resource file because it is not serializable."

2 个错误。

【问题讨论】:

    标签: c# resx invalidoperationexception reflector resgen


    【解决方案1】:

    试试这个:

    1. 在 Reflector 中打开 dll
    2. 在该程序集的 Resources 文件夹中找到您遇到问题的资源
    3. 右键单击它 -> 打开方式 -> Visual Studio 2010 或 2012

    这应该在 Visual Studio 中以 resx 的形式打开

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-04-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多