PreEmptive DotFuscator:未找到模块的调试符号,已添加具有相同键的项目

PreEmptive DotFuscator: No debugging symbols found for module, An item with the same key has already been added

我正在开发一个 .Net Standard 项目,我正在其中使用 netDxf.netstandard 库。

我正在尝试使用 DotFuscator Community Edition GUI 混淆我的代码。

DotFuscator 构建过程失败并抛出以下消息:

Reading debugging symbols for module 'MyNameSpace.dll'...
Warning: No debugging symbols found for module 'MyNameSpace.dll'.
An item with the same key has already been added.
Build Error.

经过两天的代码修剪:我最终得到了一个单文件项目并抛出相同的错误消息!

using netDxf.Entities;

namespace MyNameSpace
{
    public class Cls
    {
        public static double Method1(Polyline p)
        {
            return 0;
        }

        public static double Method2(LwPolyline p)
        {
            return 0;
        }
    }
}

这个片段有什么问题,所以混淆过程总是失败?

我在 Dotfuscator 团队工作,我以该身份回答这个问题。

感谢您发现这个问题。它似乎仅在保护 .NET Standard 库时发生,并且仅当受保护的库引用另一个名称包含 netstandard 的库时才会发生。在这种情况下,您的 .NET Standard 库引用 netDxf.netstandard.dll.

您可以通过 setting a config property with the name ilreader.alias_netstandard.never and any non-empty value. This might cause other issues with assembly resolution, however, so you may also need to update the assembly load paths 解决此问题。

至于根本问题,我们已在内部提交了一个错误。该错误将在 Dotfuscator Professional 和 Dotfuscator Community 的未来版本中修复。