Question

I'm writing application, it's near end, and i want to apply obfuscation over my code using smart assembly, and if possible signing too...

the problem is my application is multi-part, and more importantly one of it's part is service based, and it should be install using MSI setup project to work, and i cant first build, and then package it, so i need to do a build time obfuscation thing, so all Class Library Project, and Service and User Interface perform obfuscation in build time, and once they are prepared, the MSI can package them... the way it should, so every one will be happy...

i hear that there's configuration that allow Smart assembly do this in build time, but i dont know how to do it :-s

Was it helpful?

Solution

Technically, the assembly has to be built before SmartAssembly can process it - it works with Intermediate Language code and therefore can't be processed until after compilation.

However, I don't think this is an issue - ultimately you just want the build output obfuscated before it gets packaged into an MSI. So if you wanted this to happen automatically, you can edit the vsproj to include a SmartAssembly post-build step: http://www.red-gate.com/supportcenter/Content/SmartAssembly/help/6.7/SA_UsingSmartAssemblyWithMSBuild

If you are using MS Setup and Deployment Projects to build the MSI, the important change to make is to point your SmartAssembly input and output at the /obj folder because for some strange reason, Microsoft is taking the assemblies from /obj as opposed to the more-conventional /bin.

OTHER TIPS

I found a solution for this problem which "Brian Donahue" said in the answer :

If you are using MS Setup and Deployment Projects to build the MSI, the important change to make is to point your SmartAssembly input and output at the /obj folder because for some strange reason, Microsoft is taking the assemblies from /obj as opposed to the more-conventional /bin

the solution is that you open the setup (.vdproj) file with a text editor - i use Notepad++ - and then go to the end of the file until you find a node called "ProjectOutput" in this node you will find an attribute called "SourcePath" in this attribute you will find the path for the project output (.exe or .dll)

Now change this path to point to the "bin" directory instead of "obj" directory and don't forget to change the "x86" or "x64" directory to be "Release" or "Debug" directory.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top