using a C# .net dll in a C++ .net dll

I've created a dll in C# and I'm trying to using it in a C++ .net project, but everytime I run the application, I get a FileNotFoundException pointing to the C# dll. Can anyone tell me what I'm doing wrong.

All works fine from VB .Net to C# .Net, but I only have the problem in the C++ project.

[307 byte] By [telectro] at [2007-12-16]
# 1
Where is the C# assembly located? Usually the application and any associated assemblies (in this case your C# assembly) need to be in the same directory.
JonathanCavesMSFT at 2007-9-8 > top of Msdn Tech,Visual C++,Visual C++ General...
# 2

The C# assembly is located in the same directory as the C++ assembly, but the problem still exists. I'm wondering if there is a property setting I need to change in the C++ project properties.

Also, what might be related to the problem, I'm using an external function in the C++ dll that is calling the C# assembly. But I have used the MessageBox::Show function in place of the C# assembly call, and all worked fine.
Here is the code I'm using:

extern "C" int InitializeUserModule(int ParentWnd)
{
//Code from the C# assembly
System::Windows::Forms::Form *parent =
new MyClass::frmMain();
parent->ShowDialog();

return 0;
}


//This code worked fine
extern
"C" int InitializeUserModule(int ParentWnd)
{
MessageBox::Show("bla bla");

return 0;
}

//This code generated the error before the message box popped up.
extern "C" int InitializeUserModule(int ParentWnd)
{
MessageBox::Show("bla bla");

System::Windows::Forms::Form *parent = new MyClass::frmMain();

return 0;
}

telectro at 2007-9-8 > top of Msdn Tech,Visual C++,Visual C++ General...