我的应用程序编译正常,但我得到以下运行时错误:
System.IO.FileNotFoundException was unhandled
HResult=-2147024770
Message=Could not load file or assembly {Wrapper} or one of its dependencies. The specified module could not be found.
Run Code Online (Sandbox Code Playgroud)
调用Application中对Wrapper的引用看起来是正确的.Wrapper dll存在于正确的位置.
这个项目用于在别人的系统上构建和运行,我看过几次.该人/计算机不再可用.自上次成功构建和运行以来,某些依赖项的某些路径已发生更改,我已修复了与此相关的所有编译错误.
只是为了澄清我的项目结构:

Digraph G
{
App [ label = "My C# Application"]
Wrapper [ label = "C++/CLI Wrapper"]
Lib [ label = "C++ Library"]
Dll [ label = "My helper C# DLL"]
CDep [ label = "Series of deep C++ dependencies managed \n by CMake for Lib, hard coded relative paths for Wrapper."]
App->Wrapper->Lib->CDep; …Run Code Online (Sandbox Code Playgroud)