views:

378

answers:

1

I have a quite big program in .net 3.5 SP1 which is compiling just fine. However when I want to obfuscate it with Obfuscator Pro (evaluation for now), Obfuscator stops with the following error:

[Build Output] This application has requested the Runtime to terminate it in an unusual way.
[Build Output] Please contact the application's support team for more information.
[Build Output] ilasm returned 3
[Build Output] Build Error.

Since the error comes from ILASM, I thought lets do what Obfuscator does (w/o obfuscation) and executed the following commands:

=> ildasm.exe /OUT=C:\MyApp.exe.il /TEXT /NOBAR /RAWEH /QUOTEALLNAMES /UTF8 /LINENUM /FORWARD C:\MyApp\bin\Release\MyApp.exe
=> ilasm C:\MyApp.exe.il

The first command (ILDASM) passes just fine, I get a 450MB IL file.
The second command (ILASM) however crashes with the following error:

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Does anybody have any idea what the error could be?
My system is Windows 7 x64 with the tools from Visual Studio 2008 (SP1).

UPDATE:
I contacted Obfuscator support and did some tests for them. They have really helpful people there by the way.
We've discovered that the error happens only when using the x86 ILASM from the .net 2.0 framework folder. When using the one from the framework64\v2.0... then the error doesn't happen.
Also when using either (x86 or x64) ILASM from .net 4.0 (Beta 2) it passes just fine.
So this really looks like a bug in the ILASM of .net 2.0 for x86.

A: 

While the issue with ILASM isn't really solved, the following fixed the problem:

  • Use ILASM from framework64 folder
    The x64 ILASM works fine. However I couldn't force Dotfuscator to use it.
  • Install .net framework 4.0 (Beta 2)
    When ILASM from .net framework 4.0 is used it works just fine.
  • Run Dotfuscator with the '/inpl:on' flag
    Dotfuscator support told me to use this flag and it worked fine.
    According to them there shouldn't be any difference in the generated EXE so I'm using this solution currently (The flag is not available in the GUI).
Marc