The problem was that the type scrambler injected a reference of the ConfuserEx runtime framework into the target assembly instead of using the framework of the assembly.