Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

My assembly has a strong name. How can I use Dotfuscator when the obfuscation process would invalidate the signing of the assembly?

0
Posted

My assembly has a strong name. How can I use Dotfuscator when the obfuscation process would invalidate the signing of the assembly?

0

• Delay signing the assembly during development. This is done by embedding two custom attributes into your assembly. For C#, you would include the following lines into AssemblyInfo.cs: [assembly:AssemblyKeyFileAttribute(“keyfile.snk”)] [assembly:AssemblyDelaySignAttribute(true)] Where keyfile.snk is the name of the file containing your public key. • Use the strong name tool (sn.exe) that comes with the .NET Framework to turn off the strong name verification while you are testing your assembly: sn -Vr TestAsm.exe • Obfuscate the delay signed assembly using Dotfuscator. • After running through Dotfuscator turn on the verification for the obfuscated assembly using sn.exe. This unregisters the dotfuscated assembly for verification skipping: sn -Vu TestAsm.exe • Complete the signing process of the dotfuscated assembly: sn -R TestAsm.exe keyfile.snk Where keyfile.snk is the name of the file containing your private key.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.