Recently, a client project was released to Clickone, and it is mainly because it detects and automatically installs the framework, and it can also be updated automatically.
Later, because of the project needs, the leader asked to encrypt the process, we certainly did, and then found the smartassembly, found the post-release assembly is such a child
After using Clickone to publish the assembly is the. Deploy suffix, then as long as the assembly to be encrypted back to the DLL, and then put into the smartassembly inside to confuse processing and then change back, is it possible?
The answer is no.
Because this is done after the automatic update will be abnormal, the specific reason is unclear, but according to personal speculation seems to be clickone to the assembly to do a hash check, the confusion of the assembly file changed the hash value of the file caused the Clickone check failed to update, That means you have to be confused before the program is released ...
smartassembly Focus Confusion 20, good and cracked version, the key is also support MSBuild (note: Here use exaggeration, please don't care)
So according to Smartassembly's official documentation, the link is as follows
Http://documentation.red-gate.com/display/SA6/Using+SmartAssembly+with+ClickOnce+and+MSI
According to the official documentation, we create a smartassembly.targets file that reads as follows:
1 <Projectxmlns= "http://schemas.microsoft.com/developer/msbuild/2003">2 <UsingTaskTaskName= "SmartAssembly.MSBuild.Tasks.Build"AssemblyName= "SmartAssembly.MSBuild.Tasks, version=6.0.0.0, Culture=neutral, publickeytoken=7f465a1c156d4d57" />3 <TargetName= "BeforeBuild"Condition= "' $ (Configuration) ' = = ' Release '">4 <CreatePropertyValue= "true">5 <OutputTaskParameter= "Value"PropertyName= "runsmartassembly" />6 </CreateProperty>7 </Target>8 <TargetName= "Aftercompile"Condition= "' $ (runsmartassembly) '! = '">9 <CopySourceFiles= ". \obj\release\$ (TargetFileName)"DestinationFiles= ". \obj\release\$ (TargetName). temp$ (Targetext)" />Ten <SmartAssembly.MSBuild.Tasks.BuildProjectFile= "$ (solutiondir) \build\$ (TargetName). Saproj"overwriteassembly= "True" /> One </Target> A </Project>
Then create the confusing project, I'm going to confuse three assemblies, so I've built three projects, and eventually all the files are as follows:
Finally open the object csproj file in XML, add the following code at the bottom:
<Project= "$ (solutiondir) \build\smartassembly.targets"/>
Some people may ask, why the same to add such a paragraph can be confused on the various projects, in fact, look closely smartassembly.targets this document, there is a paragraph:
<projectfile= "$ (solutiondir) \build\$ (TargetName). Saproj" overwriteassembly= "True"/>
When the obfuscated item (. saproj) file is read, it is found based on the current assembly project name, which is $ (solutiondir) \build\$ (TargetName)
So each assembly project is generated by reading each of its own confusing project files, then encrypting the respective assemblies ^_^!
This is the first self-creation blog, may not be written very clear, I hope you can correct me!
Related downloads:
Smartassembly+keygen.rar
smartassembly 6 + clickone confused release, mom no longer have to worry about the program bare-Ben