title: <_CustomFiles> element not recognized in .pubxml
body: <p>I'm trying to include a file in an ASP.NET filesystem publish that's not included in the solution (it's autogenerated from a post-build script).  According to <a href="http://www.asp.net/mvc/overview/deployment/visual-studio-web-deployment/deploying-extra-files" rel="nofollow noreferrer">these instructions</a>, I should be able to add a reference to the file in my <code>.pubxml</code> definition using the <code>&lt;_CustomFiles&gt;</code> element.  Here's what my <code>.pubxml</code> file looks like:</p>
  
  <pre><code>&lt;Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
    &lt;PropertyGroup&gt;
      &lt;WebPublishMethod&gt;FileSystem&lt;/WebPublishMethod&gt;
      &lt;LastUsedBuildConfiguration&gt;Debug&lt;/LastUsedBuildConfiguration&gt;
      &lt;LastUsedPlatform&gt;Any CPU&lt;/LastUsedPlatform&gt;
      &lt;SiteUrlToLaunchAfterPublish /&gt;
      &lt;LaunchSiteAfterPublish&gt;True&lt;/LaunchSiteAfterPublish&gt;
      &lt;ExcludeApp_Data&gt;False&lt;/ExcludeApp_Data&gt;
      &lt;publishUrl&gt;(publish URL here)&lt;/publishUrl&gt;
      &lt;DeleteExistingFiles&gt;False&lt;/DeleteExistingFiles&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;PropertyGroup&gt;
      &lt;CopyAllFilesToSingleFolderForPackageDependsOn&gt;
        CustomCollectFiles;
        $(CopyAllFilesToSingleFolderForPackageDependsOn);
      &lt;/CopyAllFilesToSingleFolderForPackageDependsOn&gt;
  
      &lt;CopyAllFilesToSingleFolderForMsdeployDependsOn&gt;
        CustomCollectFiles;
        $(CopyAllFilesToSingleFolderForPackageDependsOn);
      &lt;/CopyAllFilesToSingleFolderForMsdeployDependsOn&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;Target Name="CustomCollectFiles"&gt;
      &lt;ItemGroup&gt;
        &lt;_CustomFiles Include="scripts\app.min.js" /&gt;
  
        &lt;FilesForPackagingFromProject  Include="%(_CustomFiles.Identity)"&gt;
          &lt;DestinationRelativePath&gt;Extra Files\%(RecursiveDir)%(Filename)%(Extension)&lt;/DestinationRelativePath&gt;
        &lt;/FilesForPackagingFromProject&gt;
      &lt;/ItemGroup&gt;
    &lt;/Target&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>The second <code>&lt;PropertyGroup&gt;</code> and the <code>&lt;Target&gt;</code> elements were added by me.</p>
  
  <p>However, Visual Studio isn't recognizing the <code>&lt;_CustomFiles&gt;</code> element and the file isn't being included in the publish.  Notice the green squiggly line underneath the element:</p>
  
  <p><img src="https://i.stack.imgur.com/KzP1v.png" alt="enter image description here"></p>
  
  <p>When I hover over it, the following error message is shown:</p>
  
  <pre><code>The element 'ItemGroup' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element '_CustomFiles' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'
  </code></pre>
  
  <p>Why is this element not recognized by Visual Studio?  What do I need to change in order to include this file in my filesystem publish?</p>