.NET - How to Sign an Assembly in Visual Studio 2019
Signing an assembly ensures that the consumer knows its origin and uniquely identifies the component. It makes the physical DLL file tamper-proof. This tutorial will step you through signing an assembly with a strong name key (SNK) in .NET. It is straight forward in Visual Studio 2019, but there are some pitfalls to consider. This tutorial will target .NET Standard, but the concept is the same for other target platforms. This tutorial is is backward compatible with some Visual Studio versions. Create a .NET Standard Class Library in Visual Studio. Right-click on the project and go to properties Click on the “Signing” tab Check the “Sign the assembly” checkbox Use the drop-down list to select an existing SNK, or create a new one. The file type is .pfs If you create a new .pfs, it is critical to create a strong...