title: ASP.NET Core MVC: why the content of wwwroot directory wasn't copied?
body: <p>Visual Studio 2017 (v15.4.4)<br>
  ASP.NET Core MVC</p>
  
  <p>I created new ASP.NET Core Web Application from the empty template and filled it. But when I start debugging I see that my CSS-file is not accessible.</p>
  
  <blockquote>
    <p>The page for the web address was not found <em><a href="http://localhost:51308/css/styles.css" rel="nofollow noreferrer">http://localhost:51308/css/styles.css</a></em><br>
    HTTP ERROR 404</p>
  </blockquote>
  
  <p>Why does it happen and how can I solve this problem?</p>
  
  <p><strong>styles.css</strong>:</p>
  
  <pre><code>.field-validation-error {color: #f00;}
  .field-validation-valid {display: none;}
  .input-validation-error {border: 1px solid #f00; background-color: #fee;}
  .validation-summary-errors {font-weight: bold; color: #f00;}
  .validation-summary-valid {display: none;}
  </code></pre>
  
  <p><strong>RsvpForm.cshtml</strong>:</p>
  
  <pre><code>@model Razor.Models.GuestResponse
  @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
  @addTagHelper *, Razor
  
  @{
      Layout = null;
  }
  
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta name="viewport" content="width=device-width" /&gt;
      &lt;title&gt;RSVP Form&lt;/title&gt;
      &lt;link rel="stylesheet" href="~/css/styles.css"/&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div&gt;
          This is RSVP form.
          &lt;form asp-action="RsvpForm" method="post"&gt;
              &lt;div asp-validation-summary="All"&gt;&lt;/div&gt;
              &lt;p&gt;
                  &lt;label asp-for="Name"&gt;Your name:&lt;/label&gt;
                  &lt;input asp-for="Name" /&gt;
              &lt;/p&gt;
              &lt;p&gt;
                  &lt;label asp-for="Email"&gt;Your email:&lt;/label&gt;
                  &lt;input asp-for="Email" /&gt;
              &lt;/p&gt;
              &lt;p&gt;
                  &lt;label asp-for="Phone"&gt;Your phone:&lt;/label&gt;
                  &lt;input asp-for="Phone" /&gt;
              &lt;/p&gt;
              &lt;p&gt;
                  &lt;label&gt;Will you attend?&lt;/label&gt;
                  &lt;select asp-for="WillAttend"&gt;
                      &lt;option value=""&gt;Choose an option&lt;/option&gt;
                      &lt;option value="true"&gt;Yes I'll be there&lt;/option&gt;
                      &lt;option value="false"&gt;No, I can't come&lt;/option&gt;
                  &lt;/select&gt;
              &lt;/p&gt;
              &lt;button type="submit"&gt;Submit RSVP&lt;/button&gt;
          &lt;/form&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/hKYXW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hKYXW.png" alt="enter image description here"></a></p>
  
  <p><strong>UPD</strong></p>
  
  <p>I renamed <code>styles.css</code> to <code>site.css</code> and shared this example on GitHub: <a href="https://github.com/Andrey-Bushman/asp-net-core-sandbox" rel="nofollow noreferrer">here</a> is the code source of this example.</p>