title: xbuild failing with (.html) resource files
body: <p>I'm having a problem getting xbuild to compile a web application project.
  We have some resource files, which are .html files.</p>
  
  <p>The one that's failing currently is <code>'KwasantCore\Resources\HTMLEventInvitation.html'</code></p>
  
  <p>The resource is defined in KwasantCore.csproj as</p>
  
  <pre><code>&lt;Content Include="Resources\HTMLEventInvitation.html" /&gt;
  </code></pre>
  
  <p>When building on ubuntu, the file is located here:</p>
  
  <pre><code>/home/gitlab_ci_runner/gitlab-ci-runner/tmp/builds/project-1/KwasantCore/Resources/HTMLEventInvitation.html
  </code></pre>
  
  <p>When running xbuild, I get this error:</p>
  
  <pre><code>/home/gitlab_ci_runner/gitlab-ci-runner/tmp/builds/project-1/Kwasant.sln (default targets) -&gt;
  (Build target) -&gt;
  /home/gitlab_ci_runner/gitlab-ci-runner/tmp/builds/project-1/KwasantCore/KwasantCore.csproj (default targets) -&gt;
  /usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets (GenerateResources target) -&gt;
  
      /usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets: error : Tool exited with code: 1. Output: Error: Invalid ResX input.
  Position: Line 123, Column 5.
  Inner exception: Could not find a part of the path "/home/gitlab_ci_runner/gitlab-ci-runner/tmp/builds/project-1/KwasantCore/resources/htmleventinvitation.html".
  </code></pre>
  
  <p>I checked the file, and it's there - the problem is case sensitivity. The resource is correctly referenced in the .csproj, so somewhere along the line, the resource is getting lowercased from <code>'Resources/HTMLEventInvitation.html'</code> to <code>'resources/htmleventinvitation.html'</code> </p>
  
  <p>I've taken a look at the Microsoft.Common.targets file on the ubuntu box. Line 125 is something completely unrelated (it shows me <code>&lt;/PropertyGroup&gt;</code>). Looking at the GenerateResources target, it shows me this:</p>
  
  <pre><code>&lt;Target Name = "GenerateResources"&gt;
          &lt;GenerateResource
              Sources = "@(ResxWithNoCulture)"
              UseSourcePath = "true"
              OutputResources = "@(ManifestResourceWithNoCultureName-&gt;'$(IntermediateOutputPath)%(Identity).resources')"
              Condition = "'@(ResxWithNoCulture)' != '' "&gt;
  
              &lt;Output TaskParameter = "OutputResources" ItemName = "ManifestResourceWithNoCulture"/&gt;
              &lt;Output TaskParameter = "FilesWritten" ItemName = "FileWrites"/&gt;
          &lt;/GenerateResource&gt;
  
          &lt;GenerateResource
              Sources = "@(ResxWithCulture)"
              UseSourcePath = "true"
              OutputResources = "@(ManifestResourceWithCultureName-&gt;'$(IntermediateOutputPath)%(Identity).resources')"
              Condition = "'@(ResxWithCulture)' != '' "&gt;
  
              &lt;Output TaskParameter = "OutputResources" ItemName = "ManifestResourceWithCulture"/&gt;
              &lt;Output TaskParameter = "FilesWritten" ItemName = "FileWrites"/&gt;
          &lt;/GenerateResource&gt;
      &lt;/Target&gt;
  </code></pre>
  
  <p>with the referenced targets being:</p>
  
  <pre><code>&lt;CreateItem Include="@(ResourcesWithNoCulture)" Condition="'%(Extension)' == '.resx'"&gt;
      &lt;Output TaskParameter="Include" ItemName="ResxWithNoCulture"/&gt;
  &lt;/CreateItem&gt;
  
  &lt;CreateItem Include="@(ResourcesWithNoCulture)" Condition="'%(Extension)' != '.resx'"&gt;
      &lt;Output TaskParameter="Include" ItemName="NonResxWithNoCulture"/&gt;
  &lt;/CreateItem&gt;
  
  &lt;CreateItem Include="@(ResourcesWithCulture)" Condition="'%(Extension)' == '.resx'"&gt;
      &lt;Output TaskParameter="Include" ItemName="ResxWithCulture"/&gt;
  &lt;/CreateItem&gt;
  
  &lt;CreateItem Include="@(ResourcesWithCulture)" Condition="'%(Extension)' != '.resx'"&gt;
      &lt;Output TaskParameter="Include" ItemName="NonResxWithCulture"/&gt;
  &lt;/CreateItem&gt;
  </code></pre>
  
  <p>Now, this looks suspicious to me, but I can't figure out what these <code>Include="@(ResourcesWithNoCulture)"</code> lines are doing - a search for them elsewhere doesn't give me any hints.
  The fact that it's a .html file (and not .resx), makes me suspicious of the GenerateTargets target, as it's only calling the resx versions of the targets.</p>
  
  <p>I'm not an expert on .targets files - can anyone give me a hand? I've googled around, but found no help. I would assume that it would be a fairly common bug, as resources aren't extremely rare (but perhaps without .resx they are).</p>
  
  <p>Edit: Having looked at it again, the error related to 'GenerateResources' doesn't exactly make sense: it should be failing at 'CopyNonResxEmbeddedResources', as the resources are not .resx. They GenerateResources target shouldn't be touching the .html files - as it's only looking at 'ResxWithNoCulture' and 'ResxWithCulture'</p>
  
  <pre><code>&lt;Target Name = "CopyNonResxEmbeddedResources"
          Condition = "'@(NonResxWithCulture)' != '' or '@(NonResxWithNoCulture)' != '' or '@(ManifestNonResxWithCulture)' != '' or '@(ManifestNonResxWithNoCulture)' != ''"&gt;
  
          &lt;MakeDir Directories="$(IntermediateOutputPath)%(ManifestNonResxWithCulture.Culture)"/&gt;
          &lt;Copy SourceFiles = "@(NonResxWithCulture)"
              DestinationFiles = "@(ManifestNonResxWithCulture-&gt;'$(IntermediateOutputPath)%(Identity)')"
              SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"&gt;
              &lt;Output TaskParameter = "DestinationFiles" ItemName = "ManifestNonResxWithCultureOnDisk"/&gt;
              &lt;Output TaskParameter = "DestinationFiles" ItemName = "FileWrites"/&gt;
          &lt;/Copy&gt;
  
          &lt;Copy SourceFiles = "@(NonResxWithNoCulture)"
              DestinationFiles = "@(ManifestNonResxWithNoCulture-&gt;'$(IntermediateOutputPath)%(Identity)')"
              SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"&gt;
              &lt;Output TaskParameter = "DestinationFiles" ItemName = "ManifestNonResxWithNoCultureOnDisk"/&gt;
              &lt;Output TaskParameter = "DestinationFiles" ItemName = "FileWrites"/&gt;
          &lt;/Copy&gt;
      &lt;/Target&gt;
  </code></pre>
  
  <p>The target 'CopyNonResxEmbeddedResources' is called directly before 'GenerateResources'</p>