Comments (10)
It's obfuscated and you should try de4dot first to clean it.
However, if you don't want to clean it, then you can still save it but it might not run afterwards. You can ignore all errors dnlib detects during writing by adding a dummy logger:
var mod = ModuleDefMD.Load(typeof(int).Module);
var writerOptions = new dnlib.DotNet.Writer.ModuleWriterOptions(mod);
writerOptions.Logger = DummyLogger.NoThrowInstance;
mod.Write(@"C:\out.dll", writerOptions);
from dnlib.
The goal is to get clean working assembly.
Unfortunately de4dot 3.1.41592 didn’t reconstruct method bodies and I try to “dump” assembly, using dnlib. Do you plan to update .Net Reactor deobfuscator in de4dot?
from dnlib.
If de4dot fails to deobfuscate it, email me the file.
from dnlib.
My email address is seen when you start de4dot. You just replied to github.com's issue email. This is the wrong place to discuss de4dot.
from dnlib.
writerOptions.Logger = DummyLogger.NoThrowInstance;
I Use It
but my app get an exception
"Could not load file or assembly 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified."
what can i do to solve it?
from dnlib.
You probably don't have an assembly resolver, see the readme file on the front page.
from dnlib.
AssemblyResolver asmResolver = new AssemblyResolver();
ModuleContext modCtx = new ModuleContext(asmResolver);
asmResolver.DefaultModuleContext = modCtx;
asmResolver.EnableTypeDefCache = true;
GlobAssembly.Asm = ModuleDefMD.Load(GlobAssembly.AsmInputPath);
GlobAssembly.Asm.Context = modCtx;
GlobAssembly.Asm.Context.AssemblyResolver.AddToCache(GlobAssembly.Asm);
My code for resolve references is this
is it wrong?
Because now i have that problem too
from dnlib.
Use this method.
from dnlib.
excuse me
my problem isn't solved
i made a simple project to show my problem
when i build with NoThrowInstance app have an exception
but without it app run correctly
anyway i need NoThrowInstance
from dnlib.
my problem is solved
ModuleWriterOptions();
i use this overloads
i change it to
ModuleWriterOptions(moduleDef);
and my problem solved
excuse me for my spam
from dnlib.
Related Issues (20)
- Optimize properties on `TypeRef` and `TypeDef` HOT 3
- Import property without using typeof
- HasOverrides Generic Type HOT 2
- PDB Generated is wrong HOT 7
- Linux R2R mixed dll can't be saved. HOT 2
- Single File Executable Error: .NET data directory RVA is 0
- Potential feature: Support for 64 bit offsets and length in dnlib.IO HOT 2
- The precise method for calculating 'RVA'
- Can ITypeOrMethodDef implement IMemberDef? HOT 1
- InvalidOperationException when md rva isn't alignment HOT 5
- dnlib is missing NuGet package README file
- ModuleWriterException: Invalid section RVA HOT 1
- Should we update ReturnParameter when updating ReturnType? HOT 2
- .NET cannot install (UAC prompt when running installer)
- dnlib.DotNet.Writer.ModuleWriterException HOT 2
- "Expected a null constant." error when saving assembly with pdb HOT 6
- Why don't CreateGenericInstMethodSig HOT 25
- I already know how UnknownDeclaringType happen HOT 1
- Sort `ExportedType` table in the same way as the `TypeDef` table HOT 3
- Need to dispose of enumerators
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dnlib.