[转]error MSB4018: The "GenerateResource" task failed unexpectedly
本文转自:https://github.com/Microsoft/msbuild/issues/364
After uninstall Visual Studio 2015 Update 1 RC and reinstall VS 2015 RTM I can't compile any of my projects any more. Following error occurs:
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2718,5): error MSB4018: The "GenerateResource" task failed unexpectedly.
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2718,5): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object.
https://github.com/Microsoft/msbuild/pull/314
This fixes the scenario of switching builds using RTM and Update 1.
Normal usage this should only be for an uninstall scenario since MSBuild is typically in the GAC,
but in cases of a checked in toolset or using the open source version we should be backwards compatible.
This is just renaming the fields back for the cache classes.
https://github.com/Microsoft/msbuild/pull/466
Update ResGen Serialization Compat for RTM and U1
602201c When reverting the CodeFormatter private field name changes (#314), the Dependencies class was missed. This causes an incompatibility going from Update 1 back to RTM and causes a null ref. This change fixes the compat issue (rename the field) and updates the serialization version to ensure U1 -> U2 works as expected.
Rename field for internal build.
c863538 Looks like the field was renamed for STANDALONEBUILD but not otherwise.Correcting this.
9down voteaccepted
|
I've managed to fix this issue myself and would like to document the solution here for future reference. The following error was caused by an empty XML element in the project file:
The empty element was accessed by the 'Link' task, which just failed:
Removing the respective element fixed the issue:
Hint: As it can be seen in other posts, many of the MSB4018 errors seem to be related to project files containing unexpected values. |
Another solution is to delete all generated files from the last build through an explorer window. Delete all files in: .\Project\bin .\Project\obj While you can "Clean" or "Rebuild" directly through Visual Studio, this only captures some of the files. By forcing to recompile all files, all memory locations will now correctly align and the issue should be resolved. |
MSBuild and its Toolset now Version with Visual Studio
[转]error MSB4018: The "GenerateResource" task failed unexpectedly的更多相关文章
- Visual Studio 2019 编译.Net Core Console项目出现【MSB4018 The "CreateAppHost" task failed unexpectedly】 错误
需要测试一个小东东,使用Visual Studio 2019新建了一个.Net Core的Console程序,但是在编译的时候一直报错,死活编译不通过. 错误信息: Severity Code Des ...
- VS中warning MSB8004和error MSB4018解决方案
问题如下: warning MSB8004: Output Directory does not end with a trailing slash. This build instance wil ...
- Sqoop导入数据到mysql数据库报错:ERROR tool.ExportTool: Error during export: Export job failed!(已解决)
问题描述: Container killed by the ApplicationMaster. Container killed on request. Exit code is 143 Conta ...
- nova instance出错:"message": "Proxy error: 502 Read from server failed
执行 $ nova resize instance1 时候出错: {, "details": " File \"/opt/stack/nova/nova/com ...
- Error Domain=ASIHTTPRequestErrorDomain Code=8 "Failed to move file from"xxx/xxx"to"xxx/xxx"
今天真的好高兴呀 我解决了一个折磨了我一周的问题,真的是激动地要哭出来了,为了这个问题,我嘴也烂了,头发抓了一地啊.虽然解决方法,最后还是展现出了“百度”的伟大,但是我还是很开心,在这里我展示一下我的 ...
- Activiti6.0 安装出错 log4j:ERROR setFile(null,true) call failed.
由于要选择一款合适的流程引擎,需要在jbpm和Activiti之间做对比,我这边负责Activiti的测试. 看到Activiti官网(http://www.activiti.org/download ...
- log4j:ERROR setFile(null,true) call failed.java.io.FileNotFoundException: ..\logs\2010-1-19.log (系统找不到指定的路径。)
log4j:ERROR setFile(null,true) call failed.java.io.FileNotFoundException: ..\logs\2010-1-19.log (系统找 ...
- JDE客户端get时报错“ERROR:fetch from table F0101 failed”
客户端开发时发现总报错误“ERROR:fetch from table F0101 failed” 原因是用户ID在地址名册中找不到地址号.修改用户地址号即可.如下图所示
- log4j:ERROR setFile(null,true) call failed
1.错误描述 log4j:ERROR setFile(null,true) call failed. java.io.FileNotFoundException: at java.io.FileOut ...
随机推荐
- ptyhon【递归练习】
- CYJian的水题大赛2 解题报告
这场比赛是前几天洛谷上 暮雪﹃紛紛dalao的个人公开赛,当时基本上都在水暴力分......也没有好好写正解(可能除了T1) 过了几天颓废的日子之后,本蒟蒻觉得应该卓越一下了qwq,所以就打算写一个解 ...
- Postman使用手册4——API test
一.Pre Request Scripts Postman v0.10+ 版本支持pre-request scripts. prerequest script.png pre-request scri ...
- 万事不求人系列之-智能点餐算法实现-JavaScript实现智能点餐
作为一个成长中的架构师,编码能力是万不能停止的,这个算法是之前在上一家单位帮助同事们自助订餐写的,纯爱好自己码敲的,刚好这段时间重新整理代码,发现了它,分享给大家,请大家品评指教. 使用场景介绍:随着 ...
- 2016级算法第一次练习赛-D.AlvinZH的儿时回忆——跳房子
864 AlvinZH的儿时回忆----跳房子 题目链接:https://buaacoding.cn/problem/864/index 思路 这是一道简单题,但是同样有人想复杂了,DP?大模拟?. ...
- Windows/Ubuntu下,将所有文件名字列举出来并保存到txt文件中
Windows下 使用如下的DOS命令来实现: dir /s /b > lists.txt 可以将当前路径下的所有文件的"文件路径+文件名"存储在lists.txt中. 其中 ...
- 高阶篇:4.4)FMEA手册的疑问与不足(个人观点)
本章目的:如题,述说FMEA手册第四版的疑问与不足. 1.前言 作者接触FMEA,并真正将其作为可靠性设计方法,也是在近几年的时候,所以不能说算是一个FMEA专家吧. 但作者也有一些自己的优势,就是自 ...
- 2018 ICPC Asia Jakarta Regional Contest
题目传送门 题号 A B C D E F G H I J K L 状态 Ο . . Ο . . Ø Ø Ø Ø . Ο Ο:当场 Ø:已补 . : 待补 A. Edit Distance Thin ...
- supervisor使用小记
最近使用supervisor部署爬虫,百度了很多,磕磕绊绊自己也算是用起来了,以下是整理的使用情况. 第一步: 下载安装supervisor 使用的ubuntu16.04,直接 sudo apt-ge ...
- date时间设置
date +%F时间日期 date +%Y -%m-%d 年月日 date +%T 显示时间 HMS几点几分几秒 -%H 为小时 %w 周几 date -d “-1da ...