安装dotpeek
github
官网
加载dll
导出
问题
去掉特性即可,安装mono.cecil
using Mono.Cecil;
using System;
namespace DelSuppressIldasmAttribute
{
internal class Program
{
static void Main(string[] args)
{
var input = "xxxx.dll";
var output = "xxxx.dll";
RemoveSuppressIldasmAttribute(input, output);
Console.WriteLine("移除成功");
Console.ReadKey();
}
public static void RemoveSuppressIldasmAttribute(string input, string output)
{
AssemblyDefinition assembly = AssemblyDefinition.ReadAssembly(input);
foreach (CustomAttribute attribute in assembly.CustomAttributes)
{
if (attribute.Constructor.DeclaringType.Name == "SuppressIldasmAttribute")
{
assembly.CustomAttributes.Remove(attribute);
break;
}
}
assembly.Name.PublicKey = null;
assembly.Name.PublicKeyToken = null;
assembly.Write(output);
}
}
}
参考
https://blog.csdn.net/qq_41398619/article/details/132778984
https://blog.csdn.net/tombosky/article/details/134777802
https://blog.csdn.net/educast/article/details/9700731