onizet / html2openxml

Html2OpenXml is a small .Net library that convert simple or advanced HTML to plain OpenXml components. This program has started in 2009, initially to convert user's comments from SharePoint to Word.
MIT License
297 stars 106 forks source link

Proper way to sign assembly #139

Closed onizet closed 5 months ago

onizet commented 5 months ago

After reading https://github.com/microsoft/playwright-dotnet/pull/1572, I apply the same sign process. Without sn.exe (working on MacOS), I was able to get the long public assembly key using the snippet of code from MSDN.

byte[] pk = myAssembly.GetName().GetPublicKey();
for (int i=0;i<pk.GetLength(0);i++)
      Console.Write ("{0:x2}", pk[i]);

I'm now happy to support back .Net 4.6.2 but I skip support for .Net 6 (either use to .net 8 which is LTS or use NetStandard 2.0).