I am calling Dotfuscator in the Post-build event and want it to encrypt string literals in my assembly. Unfortunately, it can only be done by specifying a so-called String encryption inclusion list. Is there a way to provide it via the command-line interface? I could do it in the Dotfuscator's config file, but that would require the hard-coding of a path, which I prefer to avoid. The Dotfuscator executable's location is on the PATH
environment variable.
I would have used MSBuild's MSBuildThisFileDirectory
property to locate the config file relative to this path, but it is not supported in .NET 3.5...
Adding the following sectio to Dotfuscator's config.xml
fixed the problem:
<renaming>
<excludelist>
<type name=".*" regex="true" excludetype="true">
<customattribute name=".*Generated.*" regex="true"/>
</type>
</excludelist>
</renaming>