dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.7k stars 1.06k forks source link

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

Open Bruce-TC opened 1 month ago

Bruce-TC commented 1 month ago

Snipaste_2024-08-29_16-58-41

當我的資料夾裡有兩個(或以上?) .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

baronfel commented 1 month ago

(Google Translate for triagers)

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. There are both .proj 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 cannot be started. After I delete the .sln file, both commands can be used. I suspect that --project has no effect.

Bruce-TC commented 1 month ago

(Google Translate for triagers)

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. There are both .proj 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 cannot be started. After I delete the .sln file, both commands can be used. I suspect that --project has no effect.

I've updated the "English translation". Thanks.