I don't normally do anything from C# to C++ (I just stay 100% C++). Usually debug assertions in that have to do with handles and stuff.
Looking at that file, on line 21 I see the following
AFXWIN_INLINE HINSTANCE AFXAPI AfxGetInstanceHandle()
{ ASSERT(afxCurrentInstanceHandle != NULL);
return afxCurrentInstanceHandle; }
The assertion is that your thread has no current instance handle. It appears to me that you need to set the instance handle of your C# application to the thread and see how that goes. It is not obvious to me how to do that since I'm not a C# person.
I believe that this must be located in a DLL project that is linked as multithreaded DLL (/MD[d])
I wish I could be more helpful