ASP.NET Core 问题

发布时间 2023-04-07 13:33:15作者: sims

1. 调试时,显示 405 页面,http://localhost:5000/index.html

原因:该 url 被浏览器缓存,启动 http://localhost:5000 时,自动跳转到 index.html 导致不支持

2. Linux 守护进程无法启动

原因:安装新版本的运行时后,dotnet 命令路径发生变化,导致无法启动程序

3. 调试出现 /usr/local/share/dotnet/sdk/7.0.100/Microsoft.Common.CurrentVersion.targets(3312,5): error MSB3552: 找不到资源文件“**/*.resx”。错误

如果是在 linux 或者 mac 上开发,可检查项目中是否包含 \ 的文件夹,例如 E:\文件数据