我有一项任务是重建我们在许多项目中丢失的一些源代码。大多数情况下,一切顺利,但当然在最后一个项目中,我遇到了一个错误,我找不到任何解决方案。
我使用 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 个错误。
最佳答案
试试这个:
- 在Reflector中打开dll
- 在该程序集的 Resources 文件夹中找到您遇到问题的资源
- 右键单击它 -> 打开方式 -> Visual Studio 2010 或 2012
这应该在 visual studio 中将其作为 resx 打开
关于c# - 将资源文件转换为 resx - 不可序列化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17203598/