gpt4 book ai didi

c++ - MSB4018 "ResolveComReference"任务意外失败

转载 作者:太空狗 更新时间:2023-10-29 21:20:03 25 4
gpt4 key购买 nike

我目前正在尝试将我们的 c++ mfc 解决方案从 visual studio 2010 升级到 visual studio 2013 解决方案。当我尝试构建它时,出现错误 MSB4018 “ResolveComReference”任务意外失败。我启用了融合日志记录,这就是它告诉我的内容:

=== Pre-bind state information ===
LOG: DisplayName = System
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: System | Domain ID: 1
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/Program Files (x86)/MSBuild/12.0/bin/
LOG: Initial PrivatePath = NULL
Calling assembly : Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. ===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files (x86)\MSBuild\12.0\bin\MSBuild.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System/System.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System/System.EXE.

我知道 msbuild 已被移动,但我不明白为什么它试图在 msbuild 路径中查找 System.dll,我怎样才能让它在正确的位置查找它?


编辑:我现在也尝试升级到 visual studio 2012,它没有遇到更大的问题,我也没有遇到同样的问题。但是我注意到,当运行 devenv/upgrade(使用 vs2013)时,它似乎完全改变了 vc++ 目录下的所有内容(升级到 vs2012 时它保持不变)。这可能与此问题有关吗?


编辑2:尝试在将项目升级到 2012 后在 vs2013 中构建项目(不运行 devenv/upgrade),这也没有用,所以我猜问题与此无关...

最佳答案

启用诊断构建输出后,我发现项目中有 3 个损坏的 COM 引用无法加载。删除这些引用解决了构建问题。这些仅在 vs2010 中显示为警告,但由于某种原因在 vs 2013 中导致 MSB4018。

关于c++ - MSB4018 "ResolveComReference"任务意外失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25545708/

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