Question

To start off, I'd like to say I'm rather unfamiliar with the Windows linking system. (Most of my programming experience was acquired on Mac OS, on which linking libraries and framework is radically different. I'm also not much of a Windows user.)

This is my setup: I've got two projects in the same solution. The first is a C++/CLI project we'll call Foo. Foo is a library project that depends on an external library (the Java Runtime Environment), and thus has the appropriate reference to the appropriate (I believe since it compiles) .lib file. (I changed no other project setting related to loading that library.) My other project, Bar is a C# console executable project that references Foo.

Both compile just fine.

However, when I execute my Bar.exe C# program, it dies before the construction of the first object that requires types from Foo. The exception is a FileNotFoundException that states the Foo.dll assembly or one of its dependencies couldn't be found.

So I launched fuslogvw to see what went wrong, but I don't really understand how it works, and the documentation I found on it is rather unhelpful. From what I think I understand, both Foo and Bar failed to load as native images, but were found to be correct IL and were properly loaded that way. There is no other relevant mention of failure, though, obviously it does fail at some point. I'd post the logs, but they're in French and I think it would be pretty useless.

Any idea?

Was it helpful?

Solution

Are all the executable and dll dependencies in the output directory? Check the native dependencies first with Depends.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top