Skip to content

Instantly share code, notes, and snippets.

@lawrence-laz
Last active January 20, 2023 15:58
Show Gist options
  • Save lawrence-laz/1d0cd639ffc6fb4814b5a4a7b01e67c5 to your computer and use it in GitHub Desktop.
Save lawrence-laz/1d0cd639ffc6fb4814b5a4a7b01e67c5 to your computer and use it in GitHub Desktop.
Examples for .csproj
<Project Sdk="Microsoft.NET.Sdk.Web">
<ItemGroup>
<!-- Copies all content from wwwroot folder to output folder specified in LinkBase -->
<None Include="wwwroot\**" Exclude="wwwroot\**\*.cs" CopyToOutputDirectory="Always" LinkBase="wwwroot\" />
<!-- If above dosn't work, maybe non-SDK style project, or solution has some non-SDK style projects, try this -->
<None Include="wwwroot\**" CopyToOutputDirectory="Always" Link="wwwroot/%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment