Skip to content
This repository has been archived by the owner on Jan 27, 2019. It is now read-only.

Unknown error occurred - System.BadImageFormatException #683

Open
epi82 opened this issue Jan 15, 2019 · 2 comments
Open

Unknown error occurred - System.BadImageFormatException #683

epi82 opened this issue Jan 15, 2019 · 2 comments

Comments

@epi82
Copy link

epi82 commented Jan 15, 2019

Hi,
I'm try to protect my console app file .EXE in NET CORE and I'm giving this error:

 [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...
[ERROR] Unknown error occurred.
Exception: System.BadImageFormatException: .NET data directory RVA is 0
   in dnlib.DotNet.MD.MetaDataCreator.Create(IPEImage peImage, Boolean verify) in C:\Users\Administrator\Documents\Visual Studio 2015\Projects\ConfuserEx\dnlib\src\DotNet\MD\MetaDataCreator.cs:riga 176
   in dnlib.DotNet.MD.MetaDataCreator.Load(IPEImage peImage) in C:\Users\Administrator\Documents\Visual Studio 2015\Projects\ConfuserEx\dnlib\src\DotNet\MD\MetaDataCreator.cs:riga 105
   in dnlib.DotNet.MD.MetaDataCreator.Load(String fileName) in C:\Users\Administrator\Documents\Visual Studio 2015\Projects\ConfuserEx\dnlib\src\DotNet\MD\MetaDataCreator.cs:riga 32
   in dnlib.DotNet.ModuleDefMD.Load(String fileName, ModuleCreationOptions options) in C:\Users\Administrator\Documents\Visual Studio 2015\Projects\ConfuserEx\dnlib\src\DotNet\ModuleDefMD.cs:riga 177
   in dnlib.DotNet.ModuleDefMD.Load(String fileName, ModuleContext context) in C:\Users\Administrator\Documents\Visual Studio 2015\Projects\ConfuserEx\dnlib\src\DotNet\ModuleDefMD.cs:riga 167
   in Confuser.Core.Project.ProjectModule.Resolve(String basePath, ModuleContext context) in C:\Users\Administrator\Documents\Visual Studio 2015\Projects\ConfuserEx\Confuser.Core\Project\ConfuserProject.cs:riga 61
   in Confuser.Core.ObfAttrMarker.MarkProject(ConfuserProject proj, ConfuserContext context) in C:\Users\Administrator\Documents\Visual Studio 2015\Projects\ConfuserEx\Confuser.Core\ObfAttrMarker.cs:riga 313
   in Confuser.Core.ConfuserEngine.RunInternal(ConfuserParameters parameters, CancellationToken token) in C:\Users\Administrator\Documents\Visual Studio 2015\Projects\ConfuserEx\Confuser.Core\ConfuserEngine.cs:riga 135
Failed at 10:44, 0:00 elapsed.

Can you help me to solve it?

Thank you.

@epi82
Copy link
Author

epi82 commented Jan 15, 2019

1

Is it normal? Unknown status.

@mkaring
Copy link

mkaring commented Jan 21, 2019

This version of ConfuserEx is not compatible with .NET Core.
Please find my fork of the project and the download of the 2.0 alpha version. That one should be able to handle .NET Core projects just fine. However the version can't yet resolve the .NET core runtime (working on it), so you have to add the directory for the .NET core runtime by hand to the list of search directories.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants