This behavior can be reproduced even for a generic console .net app:
Code: Select all
dotnet new console -f net6.0Code: Select all
namespace test;
using System.Reflection;
[Obfuscation(Feature = "virtualization", Exclude = false)]
public class Test {
[Obfuscation(Feature = "virtualization", Exclude = false)]
public void Foo(){
Console.WriteLine("Foo");
}
}
class Program
{
public static void Main(string[] args){
var obj = new Test();
obj.Foo();
}
}
Code: Select all
dotnet publish -c Release -r linux-x64 --self-contained true -o pub
cd pub
vmprotect_con test.dll test.vmp.dll
[Error] Can't resolve assembly "System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Also notice the System.Runtime version 4.2.1.0 when using --self-contained true. When building with --self-contained false - it shows the correct target version 6.0.0.0 or 8.0.0.0 but still can't resolve it.
I tried disabling "Strip Debug Information" in the project file and then calling
Code: Select all
vmprotect_con test.dll.vmp