gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 12:26:44 27 4
gpt4 key购买 nike

我有一项任务是重建我们在许多项目中丢失的一些源代码。大多数情况下,一切顺利,但当然在最后一个项目中,我遇到了一个错误,我找不到任何解决方案。

我使用 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 个错误。

最佳答案

试试这个:

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

这应该在 visual studio 中将其作为 resx 打开

关于c# - 将资源文件转换为 resx - 不可序列化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17203598/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com