Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate resource task failed error

From what I've seen about this error they are all slightly different

prior to today my code worked fine. (Visual studio 2015)

the error that I am getting is shown below

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

I have no idea what this is and no solution I have seen so far has helped me. Any help is appreciated.

like image 228
Joshua Pritchard Avatar asked Feb 07 '23 22:02

Joshua Pritchard


1 Answers

This seems to be a known bug in the RTM of Visual Studio 2015 (or better said in the MSBuild tool which Visual Studio uses).

The temporary solution seems to be this:

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.

So delete the bin and obj folder from your project and try again.

The fix seems to be deployed in Visual Studio 2015 Update 1. If you haven't installed that yet, I would give that a try.

like image 185
Patrick Hofman Avatar answered Feb 16 '23 03:02

Patrick Hofman