yck1509 / ConfuserEx

An open-source, free protector for .NET applications
http://yck1509.github.io/ConfuserEx/
Other
3.57k stars 1.64k forks source link

Packer -> An item with the same key has already been added - DevExpress #568

Open rollsch opened 7 years ago

rollsch commented 7 years ago

Simply trying to pack an exe with DevExpress 16.1 assemblies. You can reproduce it using their sample applications and only choosing to use the packer with no protections enabled.

If I pack my exe with my own DLLs but not with devexpress it succeeds but the application fails to start on invocationtarget in mscorlib which I cannot debug to find out what has gone wrong. I suspect it can't find a reference.

Can I choose to only pack some files into the EXE with others remaining external? How can I use your software with an application that uses devexpress?

[DEBUG] Creating global .cctors... [DEBUG] Watermarking... [DEBUG] Executing 'Name analysis' phase... [DEBUG] Building VTables & identifier list... [ERROR] Unknown error occurred. Exception: System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) at Confuser.Renamer.VTable.Inherits(VTableConstruction vTbl, VTable baseVTbl) in e:\Source\Public\Confuser2\Confuser.Renamer\VTable.cs:line 296 at Confuser.Renamer.VTable.ConstructVTable(TypeDef typeDef, VTableStorage storage) in e:\Source\Public\Confuser2\Confuser.Renamer\VTable.cs:line 155 at Confuser.Renamer.VTableStorage.GetOrConstruct(TypeDef type) in e:\Source\Public\Confuser2\Confuser.Renamer\VTable.cs:line 332 at Confuser.Renamer.AnalyzePhase.Execute(ConfuserContext context, ProtectionParameters parameters) in e:\Source\Public\Confuser2\Confuser.Renamer\AnalyzePhase.cs:line 46 at Confuser.Core.ProtectionPipeline.ExecuteStage(PipelineStage stage, Action1 func, Func`1 targets, ConfuserContext context) in e:\Source\Public\Confuser2\Confuser.Core\ProtectionPipeline.cs:line 139 at Confuser.Core.ConfuserEngine.RunPipeline(ProtectionPipeline pipeline, ConfuserContext context) in e:\Source\Public\Confuser2\Confuser.Core\ConfuserEngine.cs:line 221 at Confuser.Core.ConfuserEngine.RunInternal(ConfuserParameters parameters, CancellationToken token) in e:\Source\Public\Confuser2\Confuser.Core\ConfuserEngine.cs:line 175 Failed at 8:25 AM, 0:18 elapsed.

rollsch commented 7 years ago

Anyone?

bazuka5801 commented 6 years ago

Same problem

rollsch commented 6 years ago

Just don't include them.

controlbreak commented 6 years ago

any update on this? i too have the same problem

[INFO] ConfuserEx v1.0.0-custom Copyright (C) Ki 2014 [INFO] Running on Microsoft Windows NT 6.2.9200.0, .NET Framework v4.0.30319.42000, 64 bits [DEBUG] Discovering plugins... [INFO] Discovered 10 protections, 1 packers. [DEBUG] Resolving component dependency... [INFO] Loading input modules... [INFO] Loading '3DTubeSoft (64-Bit).exe'... [INFO] Loading 'ForkArm.dll'... [INFO] Initializing... [DEBUG] Building pipeline... [INFO] Resolving dependencies... [DEBUG] Checking Strong Name... [DEBUG] Creating global .cctors... [DEBUG] Watermarking... [DEBUG] Executing 'Name analysis' phase... [DEBUG] Building VTables & identifier list... [ERROR] Unknown error occurred. Exception: System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector) at Confuser.Renamer.VTable.ConstructVTable(TypeDef typeDef, VTableStorage storage) in C:\Users\Administrator\Downloads\ConfuserEx-master\Confuser.Renamer\VTable.cs:line 138 at Confuser.Renamer.VTableStorage.GetOrConstruct(TypeDef type) in C:\Users\Administrator\Downloads\ConfuserEx-master\Confuser.Renamer\VTable.cs:line 332 at Confuser.Renamer.VTableStorage.GetVTable(ITypeDefOrRef type) in C:\Users\Administrator\Downloads\ConfuserEx-master\Confuser.Renamer\VTable.cs:line 340 at Confuser.Renamer.AnalyzePhase.Execute(ConfuserContext context, ProtectionParameters parameters) in C:\Users\Administrator\Downloads\ConfuserEx-master\Confuser.Renamer\AnalyzePhase.cs:line 45 at Confuser.Core.ProtectionPipeline.ExecuteStage(PipelineStage stage, Action1 func, Func1 targets, ConfuserContext context) in C:\Users\Administrator\Downloads\ConfuserEx-master\Confuser.Core\ProtectionPipeline.cs:line 138 at Confuser.Core.ConfuserEngine.RunPipeline(ProtectionPipeline pipeline, ConfuserContext context) in C:\Users\Administrator\Downloads\ConfuserEx-master\Confuser.Core\ConfuserEngine.cs:line 219 at Confuser.Core.ConfuserEngine.RunInternal(ConfuserParameters parameters, CancellationToken token) in C:\Users\Administrator\Downloads\ConfuserEx-master\Confuser.Core\ConfuserEngine.cs:line 173 Failed at 11:27, 0:05 elapsed.

lorington commented 6 years ago

@controlbreak please contact me via e-mail: lorington@mail.ru I think we have common interest.