gpt4 book ai didi

mixed-mode - 混合模式库和 CRT 依赖项 - 帮助

转载 作者:太空宇宙 更新时间:2023-11-03 10:22:27 25 4
gpt4 key购买 nike

好吧,在进行了大量研究并尝试了几乎所有我能找到的托管 CPP Redist 以及尝试将我的 DLL 本地复制到应用程序的执行目录之后,我无法弄清楚我缺少哪些依赖项对于这个混合模式库。

基本上我有一个大型 C# 应用程序,我正在尝试使用我制作的混合模式库。在开发机器上它工作完美(当然)但是当需要加载库以使用它时由于缺少 CRT 依赖项而部署异常(我假设)。

我已经使用 dependency walker 来检查所有引用的 DLL 并确保它们存在于部署机器上但没有运气,我想知道是否可能是我缺少的一些需要注册的依赖项,但我不能弄清楚是什么。

当代码尝试从混合模式库中实例化一个类时,出现以下异常。

Exception Detail: System.IO.FileLoadException: Could not load file or assembly 'USADSI.MAPI, Version=1.0.3174.25238, Culture=neutral, PublicKeyToken=null' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)

我正在使用指定了/clr:oldSyntax 的 VS2008 SP1 编译库。

中间 list 如下所示:

<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC90.CRT' version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
</dependency>
</assembly>

我可以根据需要提供任何更多信息,不幸的是我不太精通制作混合模式库,所以这让我失望了。

如果有人能提供任何建议,我将不胜感激!

最佳答案

您是否部署了 CRT libraries在目标机器上?远景:由于您依赖于 32 位代码,因此您应该将 Build 属性选项卡中的 Target Platform 设置为 x86。

编辑:故障排除并排解决 Sxstrace.exe utility 的问题,在 Vista 上可用。

关于mixed-mode - 混合模式库和 CRT 依赖项 - 帮助,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/230715/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com