-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dotnet watch test
at the solution level provides an incorrect error message
#45761
Labels
Comments
dotnet-issue-labeler
bot
added
Area-CLI
untriaged
Request triage from a team member
labels
Jan 7, 2025
dhazel
changed the title
Jan 8, 2025
dotnet watch test
at the solution level no longer supports the --project
flagdotnet watch test
at the solution level provides an incorrect error message
nagilson
added
Area-Watch
and removed
untriaged
Request triage from a team member
labels
Jan 14, 2025
@tmat Have you seen this dotnet watch issue before? |
I got the same error when trying to build in watch mode while refactoring: $ dotnet watch --project src/<project>/ build
MSBUILD : error MSB1001: Unknown switch.
Full command line: '/usr/lib64/dotnet/sdk/9.0.101/MSBuild.dll -maxcpucount -verbosity:m -tlp:default=auto -nologo -restore -consoleloggerparameters:Summary --project src/<project>/'
Switches appended by response files:
Switch: --project
For switch syntax, type "MSBuild -help"
dotnet watch ❌ Exited with error code 1
dotnet watch ⏳ Waiting for a file to change before restarting dotnet... I also tried $ dotnet watch build --project src/<project>/ but with the same result. Dotnet info output: $ dotnet --info
.NET SDK:
Version: 9.0.101
Commit: f303476b53
Workload version: 9.0.100-manifests.6bf02610
MSBuild version: 17.12.12+f303476b5
Runtime Environment:
OS Name: fedora
OS Version: 41
OS Platform: Linux
RID: fedora.41-x64
Base Path: /usr/lib64/dotnet/sdk/9.0.101/
.NET workloads installed:
There are no installed workloads to display.
Configured to use loose manifests when installing new manifests.
Host:
Version: 9.0.0
Architecture: x64
Commit: f303476b53
.NET SDKs installed:
8.0.111 [/usr/lib64/dotnet/sdk]
9.0.101 [/usr/lib64/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.11 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.0 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.11 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.0 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
DOTNET_ROOT [/usr/lib64/dotnet]
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download Adding two additional dashes seems to work, but it uses run instead of build: $ dotnet watch --project src/<project>/ -- build |
Is this a duplicate of #45634 ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue Description
On the CLI,
dotnet watch test
at the solution level no longer supports the--project
flag, but its error message says that it does.Steps to Reproduce
.sln
file)dotnet watch test
dotnet watch test --project '.\mytestproject\mytestproject.csproj'
Expected Behavior
Error text should suggest options that the command supports, not nonexistent options
Actual Behavior
The two error messages contradict eachother
Analysis
--project
flag.Versions & Configurations
dotnet version:
9.0.101
msbuild version:
17.12.12.57101
The text was updated successfully, but these errors were encountered: