How can we help you today? How can we help you today?
Paul.Martin
You can obfuscate any pure .NET assembly, you just need to create a new SmartAssembly project for the plugin assembly and build it with the protection you want to apply. If your plugin is a library (.dll) then SmartAssembly will leave all public interfaces, types and methods visible. If your plugin is an executable (.exe) then SmartAssembly will obfuscate (effectively hiding) everything by default. You can override the default behavior by using the <ExcludePublicMembers> attribute in the SmartAssembly project file (*.saproj). This enables you to treat EXE files in a similar way to DLL files. To exclude public members from obfuscation, specify a value of '1' for the project file: &lt;Obfuscation ExcludePublicMembers="1" Obfuscate="1"&gt;... &lt;/Obfuscation&gt; As long as your main exe references the plugin you can embed or merge the plugin. If you don't have a reference to the plugin in the executable and can't add one (for instance if you want dynamically choose which plugins to load at runtime) then it is not currently possible to embed or merge the the plugin using SmartAssembly. If you can't embed the plugin you can manually do it, see http://www.codeproject.com/KB/DLL/EmbedAssemblyAsResource.aspx, although this is more of a pain to do and doesn't do any encryption or compression on the embedded plugin assembly. / comments
You can obfuscate any pure .NET assembly, you just need to create a new SmartAssembly project for the plugin assembly and build it with the protection you want to apply. If your plugin is a library...
0 votes
Yes, in the SmartAssembly settings specify to create a PDB file and make sure the Obfuscate document URLs check box is unticked. If you then build it and run, then just use Attach to Process in your debugger. / comments
Yes, in the SmartAssembly settings specify to create a PDB file and make sure the Obfuscate document URLs check box is unticked. If you then build it and run, then just use Attach to Process in you...
0 votes
Does it tell you what type it is failing to load? If not: If you turn on the Self Diagnosis feature (on the Build Succeeded page of the SmartAssembly UI) or, if you are testing on a different machine to the one with SmartAssembly on, turn on the Automated Error Reporting. When the error occurs you will then get an error report which will tell you the unobfuscated name of the type which is causing issues. Is the type defined in the main assembly and then used by the plugin? How is the type being created/used in the plugin? The mostly likely cause is that the type is mistakenly being obfuscated or pruned (this can occur if the type is defined in an exe or is only being called by reflection). If you open up the SmartAssembly project for the assembly that contains the type. If you are applying pruning to your assembly, then under the Pruning section next to the name of the assembly there will be an "Exclusions..." link. If you click on this link and then navigate through the namespace to find the type If the type is described as being a "Fully useful class" or is only listing a few members or attributes to prune then that is good and SmartAssembly has correctly identified it as being used. If it is described as a "Prunable Class" click the "Exclude from Pruning" button in the middle of the page. This will tell SmartAssembly not to prune the type. If you are applying obfuscation to your assembly, then under the Obfuscation section next to the name of the assembly there will be an "Exclusions..." link. If you follow the same procedure as I described for the pruning to make sure that it is not obfuscating the name of the typel. / comments
Does it tell you what type it is failing to load? If not: If you turn on the Self Diagnosis feature (on the Build Succeeded page of the SmartAssembly UI) or, if you are testing on a different mach...
0 votes