c# - 生成资源任务失败错误

标签 c# compiler-errors visual-studio-2015

根据我所看到的有关此错误的信息,它们都略有不同

今天之前,我的代码运行良好。 ( Visual Studio 2015)

我得到的错误如下所示

Severity Code Description Project File Line Error The "GenerateResource" task failed unexpectedly. System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Build.Tasks.ResGenDependencies.GetResXFileInfo(String resxFile) at Microsoft.Build.Tasks.GenerateResource.ShouldRebuildResgenOutputFile(String sourceFilePath, String outputFilePath) at Microsoft.Build.Tasks.GenerateResource.GetResourcesToProcess(List1& inputsToProcess, List1& outputsToProcess, List`1& cachedOutputFiles) at Microsoft.Build.Tasks.GenerateResource.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() Progress_Tracker

我不知道这是什么,到目前为止我所看到的解决方案都没有帮助到我。感谢您的帮助。

最佳答案

这好像是a known bug在 Visual Studio 2015 的 RTM 中(或者更好的说法是在 Visual Studio 使用的 MSBuild 工具中)。

临时的解决办法好像是这样的:

To work around #314, completely delete all build outputs and build again--the issue is that an internal cache gets interpreted incorrectly on the old bits, causing this crash.

因此从您的项目中删除 binobj 文件夹,然后重试。

修复似乎部署在 Visual Studio 2015 Update 1 中.如果您还没有安装它,我会试一试。

关于c# - 生成资源任务失败错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34989309/

相关文章:

c# - Visual Studio 2012 中的 MVVM Light 不显示项目模板

c# - 转换不同的对象并在同一行中调用方法?

c# - 如何在 ASP.NET Core 2.1 中获取客户端 IP 地址

c - 使用gcc编译C源代码时的问号

asp.net-mvc - ASP.NET 4.6 目标 View 中的空传播运算符错误 BC36716

c# 使用不支持的 html 敏捷包 URI 格式

Swift:比较泛型类中的泛型类型

c++ - Visual Studio : hotkey/way to automatically sort functions in . h 与.cpp保持一致

c++ - Microsoft VS2015 C++ Core Guidelines分析: "no array to pointer decay (bounds.3)" for vtable?

intellij-idea - Intellij IDEA告诉我 “Compilation completed with 52 errors and 0 warnings”