In VS 2008 when I try to step into the
return new Triangles(element, mesh);
line, I get the following error the first time
DLL 'C:\Windows\assembly\GAC\Microsoft.DirectX\1.0.2902.0__31bf3856ad364e35\Microsoft.DirectX.dll' is attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.
After the first time stepping through the code, I do not get any warnings and everything works great.
In 2010 when I get to the same line, the program hangs on the first time through (just like the warning states can happen in 2008)
There are no DirectX calls that I am aware of around this area. How can I better debug this issue and what do I need to do to resolve it?
Thanks
Answer - Hopefully this will help some other people. I was able to get my solution in VS 2010 to work like the VS 2008 solution by creating an app.config file.
<startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0"/> </startup>