"wwwroot"中的某些文件文件夹未在ASP.NET Core Web部署中发布

编程入门 行业动态 更新时间:2024-10-20 07:54:08
本文介绍了"wwwroot"中的某些文件文件夹未在ASP.NET Core Web部署中发布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在Visual Studio 2017中使用ASP.NET Core 2.0.

I am using ASP.NET Core 2.0 in VisualStudio2017.

当我在 IIS Express 中进行调试时,我的网站运行正常.但是,当将站点部署到IIS服务器时,并不会部署wwwroot中的所有文件夹和文件.我已经看过.csproj文件,但是我不知道如何确保它部署了所有文件和文件夹.

My site works fine when I hit debug in IIS Express. But when deploying the site to IIS server, not all the folders and files in wwwroot are deployed. I have looked at the .csproj file, but I don't know how to make sure it deploys all files and folders.

推荐答案

我解决了这个问题.解决方案是编辑.csproj文件.

I solved the issue. The solution is to edit the .csproj file.

删除所有与wwwroot相关的 ItemGroup 标记,然后添加以下标记:

Remove all the ItemGroup tags related to wwwroot and then add this one:

<ItemGroup> <None Include="wwwroot\*" /> </ItemGroup>

星号将包含所有子文件夹和文件.

The asterisk will include all the subfolders and files.

更多推荐

"wwwroot"中的某些文件文件夹未在ASP.NET Core Web部署中发布

本文发布于:2023-11-07 11:01:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1566275.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件夹   文件   wwwroot   quot   Web

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!