dotnet / dotnet/sdk

dotnet watch run --project <PATH> Can't Work

Open
#43,108 2 comments 1 reaction 0 assignees View on GitHub
Area-Watch untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

![Snipaste_2024-08-29_16-58-41](https://github.com/user-attachments/assets/adf62f23-23dd-4150-9b83-64f7ea25a57d)

當我的資料夾裡有兩個(或以上?) .sln 檔,即使使用 --project 指定檔案 dotnet watch run 也無法啟動。
同時有 .csproj 檔與 .sln 檔時,即使我使用' dotnet watch run --project "D:\Project\新增資料夾\EywaLink.BlazorServer\EywaLink.BlazorServer\EywaLink.BlazorServer.csproj" '也一樣不能啟動。
當我刪除 .sln 檔之後,只保留一個 .csproj 檔或 .sln 檔,' dotnet watch run '指令與' dotnet watch run --project '才可以使用,我懷疑是 --project 沒有作用。

---The following is google translate---
When there are two (or more?) .sln files in my folder, dotnet watch run cannot be started even if I use --project to specify the file.
When there are both .csproj files and .sln files, even if I use ' dotnet watch run --project "D:\Project\New Folder\EywaLink.BlazorServer\EywaLink.BlazorServer\EywaLink.BlazorServer.csproj" ' it still doesn't work.
After I delete the .sln file, only a .csproj file or a .sln file remains, and the ' dotnet watch run ' command and ' dotnet watch run --project ' can be used. I suspect that --project has no effect.

![Snipaste_2024-08-30_10-13-35](https://github.com/user-attachments/assets/ae8c8e79-9f71-42a3-bd2a-9bc99de29b83)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.