Well, that problem was solved, but I've hit another one that seems
related to the CRT problem. The error doesn't actually produce an
exception (even when running in the debugger), it just brings up the
"Report this error to Microsoft" window. When I check the "what does
this error report contain?" link, I notice the C runtime library
referenced, but after checking the Platform SDK versions loaded, I
notice they're the same. However, a couple of the C++ DLLs use ATL and
were built with VS2003.
What bites is that, since they use ATL and MFC, I can't compile them
under VC2005 Express. Is there some way to get the runtime from the
older version of Studio?
Lee Crabtree
Willy Denoyette [MVP] wrote:
"Lee Crabtree" <lc*******@goisi.comwrote in message
news:eT**************@TK2MSFTNGP03.phx.gbl...
| I'm migrating a project from one machine to a newer machine. The
| project has several C++/CLI DLLs, as well as a lot of C#. On the older
| machine, everything runs. On the newer machine, I get a
| System.IO.FileNotFoundException just as I call into a function using a
| part of one of the C++ DLLs. Something like this:
|
| public class CSharpThing
| {
| public CSharpThing()
| {
| CallUnmanaged();
| }
|
| public void CallUnmanaged()
| {
| //here's an unmanaged call!
| }
| }
|
| The exception occurs on the line where CallUnmanaged is CALLED, not
| where the unmanaged call itself is. That sort of makes me think it's
| something to do with the CRT not being found, as the module itself is
| being referenced properly.
|
| What really gets me is that the InnerException is null. The FileName is
| ALSO null, which is REALLY freaky. What on EARTH am I supposed to take
| away from an exception like that?
|
| Lee Crabtree
This means that one of the C++ DLL's or (more likely) some of it's dependent
DLL's are missing. Make sure you have the CRT version installed to be the
same as on your development box.
Willy.