GitHub Actions中dotnet publish识别含点号MAUI项目报错的解决方法
GitHub Actions中MAUI项目含点号时dotnet publish找不到项目文件的解决办法
问题场景
在GitHub Actions中为MAUI应用配置CI/CD流程,执行dotnet publish命令时,若项目名称包含点号(例如AppTest.Maui),会出现项目文件找不到的错误。
错误的Build步骤:
- name: Build run: dotnet publish AppTest.Maui/AppTest.Maui.csproj
报错信息
MSBUILD : error MSB1009: Project file does not exist.
排查过程
- 确认问题由项目名称中的点号导致:将项目重命名为不含点号的
AppTest后,以下命令可正常运行:
- name: Build run: dotnet publish AppTest/AppTest.csproj
- 尝试用下划线替代点号等其他写法,均未解决问题。
解决方案
为包含点号的项目路径添加双引号,正确的命令写法如下:
- name: Build run: dotnet publish "AppTest.Maui/AppTest.Maui.csproj"
内容的提问来源于stack exchange,提问作者Kyle Fuller
相关产品推荐
相关产品推荐

