Per-core licensing is how a lot of server software is sold: a price that scales with the CPU capacity the customer runs you on, because a database engine or analytics service on a 64-core box delivers far more value than the same binary on a 4-core VM. The model is simple to state and surprisingly easy to get wrong, because the hard part is not the policy β it is answering, correctly and tamper-resistantly, the question "how many cores is this actually running on?" In .NET the obvious API gives you the wrong answer more often than the right one.
The counting trap
Reach for Environment.ProcessorCount and you will ship a licensing bug.β¦