我的 .net 4.5 项目正在引用一个 nuget 包(System.ValueTuple 4.3.0,针对 .netstandard)。代码使用 SmartAssembly 6.10 进行了混淆(我知道这个版本不支持 .NET Standard)。
该程序在运行 .NET 4.7.1 的机器上运行良好。当达到 Value Tuple 代码时,程序在运行 .NET 4.5.2 的机器上失败:
System.InvalidProgramException: Common Language Runtime detected an invalid program
我理解为什么这在 4.5.2 上失败,但不清楚为什么它在 4.7.1 上工作。如果我的 SmartAssembly 版本不支持 .NET Standard,我希望在两台机器上都能看到异常,无论 .NET 版本如何。
不用说,当不使用 SmartAssembly 时,该程序在两台机器上都可以正常工作。
感谢您的想法。