G
Gerhard Menzl
This must be one of the most frequently asked questions related to the
..NET framework, yet there seems to be no authoritative answer.
I have created a C++ .NET application that references three assemblies
other than the framework assemblies: a C++ assembly written by myself, a
C# assembly, and an RCW Interop assembly automatically generated by
Visual Studio. The reference tree looks like this:
C++ EXE
|
----------------------------
| | |
C++ DLL C# DLL RCW Interop DLL
On my development machine, everything works like a breeze. Well, sort
of. But when copying the four assemblies to another machine (all into
the same directory), starting the application raises the dreaded
System.IO.FileNotFoundException exception in wWinMain. The message text is
"File or assembly name <name of my C++ DLL>, or one of its
dependencies, was not found."
I have searched both the Web and Usenet extensively, and the causes
stated most often just don't seem to apply:
1. GAC
The C++ DLL (the one the framework complains it cannot find although it
is in the same directory) used to be a strong-named assembly. Adding it
to the GAC was of no avail, and so was removing the strong name.
2. Permissions
Everyone has full control in the application directory.
3. COM Interop
The COM server referenced by the Interop assembly has been installed
properly.
This problem seems to plague hundreds of people, yet I have not been
able to find a comprehensive overview of the possible causes. XCOPY
deployment? Come on!
Ideas anyone?
..NET framework, yet there seems to be no authoritative answer.
I have created a C++ .NET application that references three assemblies
other than the framework assemblies: a C++ assembly written by myself, a
C# assembly, and an RCW Interop assembly automatically generated by
Visual Studio. The reference tree looks like this:
C++ EXE
|
----------------------------
| | |
C++ DLL C# DLL RCW Interop DLL
On my development machine, everything works like a breeze. Well, sort
of. But when copying the four assemblies to another machine (all into
the same directory), starting the application raises the dreaded
System.IO.FileNotFoundException exception in wWinMain. The message text is
"File or assembly name <name of my C++ DLL>, or one of its
dependencies, was not found."
I have searched both the Web and Usenet extensively, and the causes
stated most often just don't seem to apply:
1. GAC
The C++ DLL (the one the framework complains it cannot find although it
is in the same directory) used to be a strong-named assembly. Adding it
to the GAC was of no avail, and so was removing the strong name.
2. Permissions
Everyone has full control in the application directory.
3. COM Interop
The COM server referenced by the Interop assembly has been installed
properly.
This problem seems to plague hundreds of people, yet I have not been
able to find a comprehensive overview of the possible causes. XCOPY
deployment? Come on!
Ideas anyone?