Nvidia NvPerfHud and XNA / C#
Just wanted to post this here in hopes that Google will pick it up and help others that might encounter the same problem since I found absolutely nothing about this on the INTERTUBES.
NvPerfHud crashes horribly every time we try to run it with our game through it. The crashes make little sense, as it is not our executable that is crashing, but csc.exe (C# command line compiler) as well as some other stuff like the windows error reporting mechanism. Other XNA applications work fine however so I knew it had to be something specific to our game. After hours of debugging and talking to some Nvidia guys on their forums, I managed to find out that it was XML deserialization that was causing the culprit. Apparently when C# deserializes an XML file (that we use for settings and particle systems) it creates temporary code in your temporary folder and compiles it to a dll that it then loads to deserialize the XML.
I do however not have a solution for this (yet), we just disabled the component that was loading the XML. This would probably be fixable by precompiling the XML serialization routines, which is possible with some tools (such as Sgen), but they did not work for me due to some weird namespace conflicts, which were a documented limitation of the tools.