問題描述
如何在構建中自動化 Dotfuscator (How to automate Dotfuscator in build)
I have to protect some dll in my mvc2 project in visual studio 2010. I'm using Dotfuscator and i want to automate it in build process. I refer the following article but I have no idea how to implement it. http://msdn.microsoft.com/en‑us/library/hh977082(v=vs.107).aspx
‑‑‑‑‑
參考解法
方法 1:
We do this by creating a .proj file (MSBuild.exe) and call it directly using exec.
<Exec Command='"$(OBFU_HOME)\dotfuscator.exe" dotfuscator.xml'/>
<Exec Command='"$(SN_HOME)\sn.exe" ‑R filename.dll filename.snk'/>
OBFU_HOME & SN_HOME are set in the environment. Make sure you call sn.exe after as the dll needs to be re‑signed.
Will this work for you? If not, then you need to put it in the post build event handler.
(by Dilma、David Thielen)