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?
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.
User contributions licensed under CC BY-SA 3.0