将资源文件转换为resx - 不可序列化

Tyl*_*son 2 c# reflector resx invalidoperationexception resgen

我有一个任务,我正在重建我们为许多项目丢失的一些来源.最多,它已经很好了,但当然在最后一个项目中,我遇到了一个错误,我无法找到任何解决方案.

我使用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."
Run Code Online (Sandbox Code Playgroud)

2个错误.

Jas*_*ley 5

试试这个:

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

这应该在视觉工作室中作为resx打开它