This is my friend's his project that I need, it works perfectly fine but here it struggles to start up, giving this error:
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(List`1& inputsToProcess, List`1& 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.<ExecuteInstantiatedTask>d__26.MoveNext() RecipesApp
I've read many solutions: this is my Obj folder if this helps any:
Deleted my entire 'obj' folder and it seems to work.
The temporary solution seems to be this:
completely delete all build outputs and build again (bin
and obj
directories)
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). changing files from windows explorer or overwriting Solution parts or even changing the directory of project are known cases of this incident.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With