[英]ASP.NET Core publish of wwwroot subfolders starting with '.'
I have an ASP.NET Core project where wwwroot
folder subfolders that start with a letter get published fine but ones that start with .
我有一个 ASP.NET Core 项目,其中以字母开头的
wwwroot
文件wwwroot
文件夹可以正常发布,但以.
do not, eg wwwroot/.auth
不要,例如
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 .
是否有已知原因导致这种情况,或者是否需要在 csproj [和 dockerfile] 中执行一些特殊情况步骤以包含以
.
? ?
I had this problem too, I need to publish some static files in wwwroot/.well-known
folder for LetsEncrypt validation我也有这个问题,我需要在
wwwroot/.well-known
文件夹中发布一些静态文件以进行 LetsEncrypt 验证
Just "include" the folder in the project, then press F4 on its files and in the "properties" set "copy to output folder"只需“包含”项目中的文件夹,然后在其文件上按 F4 并在“属性”中设置“复制到输出文件夹”
Alternatively just copy-paste this into your .csproj或者,只需将其复制粘贴到您的 .csproj 中
<ItemGroup>
<Content Include="wwwroot\.well-known\*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.