Last active
March 17, 2025 19:00
-
-
Save lawrence-laz/1d0cd639ffc6fb4814b5a4a7b01e67c5 to your computer and use it in GitHub Desktop.
Examples for .csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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)" /> | |
<!-- Seems like if item is part of .sln (as opposed to just some outside file) then this is needed --> | |
<None Include="wwwroot\**" Exclude="wwwroot\**\*.cs" CopyToOutputDirectory="PreserveNewest" 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