I have an ASP.NET Core project where wwwroot
folder subfolders that start with a letter get published fine but ones that start with .
do not, eg wwwroot/.auth
Is there a known reason for that to be the case or does one need to do some special case step in csproj [ and dockerfile ] to include those subfolders starting with .
?
I had this problem too, I need to publish some static files in wwwroot/.well-known
folder for LetsEncrypt validation
Just "include" the folder in the project, then press F4 on its files and in the "properties" set "copy to output folder"
Alternatively just copy-paste this into your .csproj
<ItemGroup>
<Content Include="wwwroot\.well-known\*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.