Menu

1 / 3

What your .NET release looks like to everyone else, and how to change that without breaking it

DEV Community: dotnet·ProofCloak·1 day ago
#iebXDIdN
#devtodotnet#devto#dev#string#file
Reading 0:00
15s threshold

Build a small .NET app in Release and open the DLL in ILSpy. You get your class names, your string constants and your license check back as C#. This post shows that on a sample, protects the sample, and then checks what changed and what didn't.

What ships today

The sample is InvoiceDesk , an 11 KB console app with three things most commercial products have: a license check, a pricing rule, and a settings class it reads with System.Text.Json . Everything in it is internal , the way application code usually is.

Here is the license validator from the Release DLL, as printed by ilspycmd (ILSpy's command-line build):

internal static class LicenseValidator { private static readonly string ProductSalt = "invoicedesk-pro-2026" ;

internal static bool IsValid ( string customerEmail , string licenseKey ) { if ( string . IsNullOrWhiteSpace ( licenseKey ) || licenseKey . Length != 29 ) { return false ; } string s = ComputeKey ( customerEmail ) ; return CryptographicOperations . FixedTimeEquals ( Encoding . ASCII .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.