title: Visual Studio publish ignores .js files in Views folder, for .NET Core
body: <p>Here's the steps:</p>
  
  <ol>
  <li>Create a simple project using <strong>ASP.NET Core Web Application</strong> template</li>
  <li>Publish it without modifying anything, to a folder</li>
  </ol>
  
  <p>If <code>Views</code> folder is not in the published output, it's because your version of .NET Core compiles views by default. Simply add this to your <code>.csproj</code>:</p>
  
  <pre><code>&lt;PropertyGroup&gt;
      &lt;TargetFramework&gt;netcoreapp2.0&lt;/TargetFramework&gt;
      &lt;MvcRazorCompileOnPublish&gt;false&lt;/MvcRazorCompileOnPublish&gt;
    &lt;/PropertyGroup&gt;
  </code></pre>
  
  <p>And publish again.</p>
  
  <ol>
  <li>Now add a <code>Home.js</code> file to <code>Views/Default</code> folder</li>
  <li>Publish again to a folder</li>
  <li>As you can see, <code>Home.cshtml</code> is published to the output folder, but <code>Home.js</code> is not.</li>
  </ol>
  
  <p>What's wrong here? This makes our deployment engine inefficient and we need to manually keep <code>.js</code> files in sync.</p>