Jump to content
Sign in to follow this  
zhuk

dnSpy: saving module error

Recommended Posts

I open assembly dll, have found the place to change, changed, click Save Module and receive:

 

"Writing D:\_deadlocks\ass.Common.dll...

Instruction operand is null
Error calculating max stack value. If the method's obfuscated, set CilBody.KeepOldMaxStack or MetadataOptions.Flags (KeepOldMaxStack, global option) to ignore this error. Otherwise fix your generated CIL code so it conforms to the ECMA standard.
All files written to disk."
 
How can I save the assembly and the use it in app?
PS. In other words: I have found that I need to change up to 10 occurrences string "T" to "P".
I think probably I can do it with Hex Editor but with dnSpy it is easier.
 

Share this post


Link to post

If you only need to change 10 occurences of a string, use a hex editor. It will work very reliably.

dnSpy, on the other hand, will try to build a completely new assembly and will most likely f*ck up lots of stuff in the process, especially if some of the code is obfuscated. 

Share this post


Link to post

Yes, about 10, but Hex editor does not find them. I try to find "T" (as I see in dnSpy) in HexWorkshop but it finds nothing...

Share this post


Link to post

you can right click -> see in hex editor WITHIN dnspy its an inbuilt feature

 

modify from this 

Share this post


Link to post

Solved. It was obfuscated code, after the deobfuscating I could do it.

Thanx to all.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...