依赖项的依赖项未包含在构建输出中

Dependencies of dependencies not included in build output

我在 Visual Studio 2017 年有一个 C# 解决方案。当我从我的本地计算机 运行 它时,它工作正常。但是,当我构建解决方案并将其移动到新机器时,它不起作用,因为缺少依赖项。

System.DllNotFoundException: Unable to load DLL 'ace32.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

我没有直接引用这个 DLL,但我发现它在直接依赖项中被引用 Advantage.Data.Provider.dll

ace32.dll 依赖项包含在 Advantage 数据库服务器的 SDK 中。

我需要在目标机器上安装SDK吗?或者有什么方法可以包含此依赖项的依赖项,以便 ace32.dll 包含在发布版本中?

根据@auburg 的评论,我创建了一个安装程序项目并手动包含 ace32.dll。错误不再发生。