MSB4018 "ResolveComReference"任务意外失败
MSB4018 The "ResolveComReference" task failed unexpectedly
我目前正在尝试将我们的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)MSBuild12.0binMSBuild.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:WindowsMicrosoft.NETFrameworkv4.0.30319configmachine.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,我如何让它在正确的位置查找它?
编辑:我现在也尝试升级到visualstudio2012,它没有遇到更大的问题,我也没有遇到同样的问题。然而,我注意到,当运行devenv/update(使用vs2013)时,它似乎完全改变了vc++目录下的所有内容(升级到vs2012时保持不变)。这与这个问题有关吗?
第2版:在升级到2012年后(没有运行devenv/update),尝试在vs2013中构建该项目,但也没有成功,所以我想问题与此无关。。。
在启用诊断构建输出后,我发现项目中有3个损坏的COM引用无法加载。删除这些引用解决了构建问题。这些在vs2010中仅显示为警告,但由于某种原因,在vs2013中导致MSB4018。
这是您的问题:
LOG: Appbase = file:///C:/Program Files (x86)/MSBuild/12.0/bin/
如果你真的需要它指向另一个过滤器,请修复构建系统中的基本文件夹。然而,最好是重新构建目标为2013年的系统,而不是修补2010年的版本。
相关文章:
- 如果没有malloc,链表实现将失败
- 模板参数替换失败,并且未完成隐式转换
- 具有默认模板参数的多态类的模板推导失败
- 视图中的参数推导失败:take_while
- 链接到自行创建的dll失败
- 带有特殊路径部分的"std::filesystem::weakly_canonical"失败
- 在C++中对T*类型执行std::move的意外行为
- GetShortPathName在网络驱动器上使用中文文件夹时失败
- gcc和c++17的过载解析失败
- 为什么使用 P/Invoke 调用 dll 时,某些计算机中的 LoadLibrary 失败?
- 在WSL:configure_file上对config_file的每次调用都失败:配置文件时出现问题
- 使用 GCC 卸载的 OpenMP 卸载失败,并出现"Ptx assembly aborted due to errors"
- 使用cmake从源代码构建MySQL连接器/C++失败(与以前的声明冲突)
- 创建进程失败,意外错误
- 语法意外失败提升::精神语法定义
- MSB4018 "ResolveComReference"任务意外失败
- 代码意外编译失败.为什么
- 模板类中' is_base_of '的静态断言在MSVC中因类型意外而失败
- Cuda错误:意外启动失败
- 在GCC和Clang下,带有lambda的简单RAII包装器的复制初始化意外失败