title: Visual Studio error: The "GenerateResource" task failed unexpectedly ... The file exists
body: <p>I am trying to build a solution with many projects, and I'm getting this error for a Windows Service project:</p>
  
  <pre><code>The "GenerateResource" task failed unexpectedly.
  System.Runtime.InteropServices.COMException (0x80070050): The file exists. (Exception from HRESULT: 0x80070050)
     at Microsoft.Build.Shared.NativeMethodsShared.InprocTracking.WriteContextTLogs(String intermediateDirectory, String tlogRootName)
     at Microsoft.Build.Utilities.FileTracker.WriteContextTLogs(String intermediateDirectory, String taskName)
     at Microsoft.Build.Tasks.GenerateResource.Execute()
     at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
     at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean&amp; taskResult)   ImportProcessorWindowsService
  </code></pre>
  
  <p>As suggested in <a href="https://stackoverflow.com/questions/15034/visual-studio-error-the-generateresource-task-failed-unexpectedly">another similar question</a>, I tried deleting my .suo file, but that did not help.</p>
  
  <p>I have been able to build this solution in the recent past. How do I fix this?</p>