Signing XML document with digital signatures exception

0

I have been following this MSDN example and when I try to compile it, it throws this exception: An attempt was made to load a program with an incorrect format. (0x8007000B) everything seems to work fine until it reaches xmlDoc.Load("test.xml"); part. I searched around for a while and can't find an answer.

Did I miss something? Does anyone know why this is coming up?

digital-signature
msdn

1 Answer

0

Setting the Platform target in Properties -> Build as x86 rather than "any CPU" solves it.

Dunno why XML file needs to be loaded with 32-bit only tho.

answered on Stack Overflow Jun 29, 2020 by Enkhbold Munkhbold

User contributions licensed under CC BY-SA 3.0