shreesharao / aspnetcore-ConsoleToWeb

Convert Console project to web project for understanding the working of asp.net core mvc
0 stars 0 forks source link

dotnet publish not publishing static files directory #1

Closed shreesharao closed 6 years ago

shreesharao commented 6 years ago

dotnet publish command is not copying static files to output publish directory

shreesharao commented 6 years ago

There is a CopyToPublishDirectory attribute for ItemGroup elements that determines whether to copy the file to the publish directory and can have one of the following value:

Example:

<ItemGroup>
    <Content Include="wwwrootalias\css\site.css">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>