I am new to Dotfuscator. I want to protect my .exe file through dotfuscator in visual studio2008 using post build option.But I am unable to do this ok,I am using the command in post build option like "dotfuscator C:\Users\Administrator\Desktop\Hello\Hello\bin\x86\Debug\Hello.exe" but VS2008 show the error the "The command "dotfuscator C:\Users\Administrator\Desktop\Hello\Hello\bin\x86\Debug\Hello.exe" exited with code 9009". What should I do.
2 Answers
Tr creating a myDotfuscatorConfig.xml in the same directory as your source root (C:\Users\Administrator\Desktop\Hello\Hello), looking something like this:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE dotfuscator SYSTEM "http://www.preemptive.com/dotfuscator/dtd/dotfuscator_v2.3.dtd">
<dotfuscator version="2.3">
<input>
<loadpaths />
<asmlist>
<inputassembly refid="6175A05D-933C-44BB-B183-AAA5F32C49D1">
<file dir="${configdir}\bin\x86\Debug" name="Hello.exe" />
</inputassembly>
</asmlist>
</input>
<output>
<file dir="${configdir}\bin\x86\obfuscated\Debug" />
</output>
</dotfuscator>
Then, execute dotfuscator.exe and pass the name of the config file as the argument. If this works ok from the commandline, adding it as a post-build action should be trivial.

- 10,827
- 4
- 40
- 77
-
Post more info on what you type at the commandline, as well as exactly what the output/error messages are. I notice you have misspelled "dotfruscator" in the question a few times for example. – Anders Forsgren Aug 23 '11 at 09:06
-
Actually I am using this command"C:\Program Files\Microsoft Visual Studio 9.0\Application\PreEmptive Solutions\Dotfuscator Community Edition\dotfuscator.exe /in: C:\Users\Administrator\Desktop\Hello\Hello\bin\x86\Debug\Hello.exe" – jiten Aug 23 '11 at 09:14
-
This command execute in vs08 command prompt and open dotfuscator.exe GUI and take input as Hello.exe.But I don't know how to build it from command and sava it appropiate place. – jiten Aug 23 '11 at 09:19
Anders is correct, creating a config file and sending that to Dotfuscator via the command line is the way to go. However, you'll need to register for an account at http://www.preemptive.com and download the latest Dotfuscator CE patch that includes command-line support. The version that comes with Visual Studio does not support a fully-automated command line mode. Once you have the updated version installed, you should be able to run "dotfuscator.exe " without issue.

- 237
- 1
- 9