混合模式库和CRT依赖关系 - 帮助 [英] Mixed Mode Library and CRT Dependencies - HELP

查看:145
本文介绍了混合模式库和CRT依赖关系 - 帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,在做了大量的研究,尝试几乎每一个管理的CPP Redist,我可以找到,并试图将我的DLL本地复制到应用程序的执行目录,我无法弄清楚我错过了什么依赖关系这个混合模式库。



基本上我有一个大的C#应用​​程序,我试图使用一个混合模式库。在开发机器上,它工作完美(当然),但是当库需要加载使用时才部署,因为缺少CRT依赖关系(我假设)。



我已经使用依赖关系Walker检查引用的所有DLL,并确保它们存在于部署机器上,没有运气,我想知道是否有一些需要注册的依赖关系,我不知道什么



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


异常详细信息:
System.IO.FileLoadException:无法
加载文件或程序集USADSI.MAPI
版本= 1.0.3174.25238,
文化=中性,PublicKeyToken = null'
或其依赖关系之一。这个
应用程序无法启动
,因为应用程序配置
不正确。重新安装
应用程序可能会解决此问题。
(HRESULT的异常:0x800736B1)


我正在使用VS2008 SP1编译库,并指定了/ clr:oldSyntax。 / p>

中间清单如下所示:

 < 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>
<依赖关系>
< dependentAssembly>
< assemblyIdentity type ='win32'name ='Microsoft.VC90.CRT'version ='9.0.21022.8'processorArchitecture ='x86'publicKeyToken ='1fc8b3b9a1e18e3b'/>
< / dependentAssembly>
< / dependency>
< / assembly>

我可以根据需要提供更多信息,不幸的是我不太熟练地制作混合模式库所以这已经把我抛弃了。



如果有人可以提供任何建议,我将非常感谢!

解决方案

您是否部署了 CRT库?长时间:由于您依赖于32位代码,因此您应该将Build Platform设置为Build属性选项卡中的x86。



编辑:故障排除边解决 Sxstrace.exe实用工具的问题,在Vista上可用。


Alright, after doing a ton of research and trying almost every managed CPP Redist I can find as well as trying to copy my DLLs locally to the executing directory of the app I cannot figure out what dependencies i'm missing for this mixed mode library.

Basically I have a large C# application and I'm trying to use a mixed mode library I made. On the development machine it works perfect (of course) but deployed when the library needs to be loaded for use it exceptions out because of missing CRT dependencies (I assume).

I have used dependency walker to check all the DLLs referenced and ensured they exist on the deployment machine with no luck, I'm wondering if maybe it's some dependencies that need to be registered that I am missing, but i can't figure out what.

I get the following exception when code tries to instantiate a class from the mixed mode library.

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)

I am compiling the library using VS2008 SP1 with /clr:oldSyntax specified.

The intermediate manifest looks like this:

<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>

I can provide any more information as needed, unfortunately i'm not well versed in making mixed mode libraries so this has thrown me off.

If anyone can offer any advice I would greatly appreciate it!

解决方案

Did you deploy the CRT libraries on the target machine? Long shot: since you have a dependency on 32-bit code, you should set Target Platform in the Build property tab to x86.

EDIT: trouble-shoot side-by-side resolving problems with the Sxstrace.exe utility, available on Vista.

这篇关于混合模式库和CRT依赖关系 - 帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆