Add support for signing XML files


It'd be nice if some supported was added to sign XML files. We were using Mage.exe with our old certificates to sign ClickOnce and VSTO files. With the new certificates, Mage.exe doesn't work and I haven't been able to find another option.

Mage.exe uses the SecurityUtilities.SignFile method from Microsoft.Build.Tasks.v4.0.dll in order to sign these files but it fails because it uses the X509Certificate2.PrivateKey property.


bartonjs wrote Mar 31, 2016 at 9:59 PM

Right now the efforts behind this library is not to add more, but to move the features into .NET proper.

http://connect.microsoft.com/VisualStudio (Report a bug, make sure to pick ".NET Framework" (which right now identifies itself as version 4.6)).

We've been increasing CNG support throughout the 4.6 series of .NET (and just announced 4.6.2 Preview: https://blogs.msdn.microsoft.com/dotnet/2016/03/30/announcing-the-net-framework-4-6-2-preview/). If your scenario still fails with CNG keys in 4.6.2 preview, we'd definitely want to hear about it.

wrote Apr 19, 2016 at 12:01 AM

wrote Oct 27, 2016 at 11:31 AM