Skip to content

Previously working dotnet watch test command stopped working on .NET 9 #50776

@bwiklund

Description

@bwiklund

we have a solution with a project that tests another project using NUnit.

script: (using bash on windows)
dotnet watch --project Tests/Tests.csproj test

used to work on <= .net 8. (and still works on mac with 9)

Now, it gives this error:

MSBUILD : error MSB1001: Unknown switch.
    Full command line: 'C:\Program Files\dotnet\sdk\9.0.305\MSBuild.dll -maxcpucount -verbosity:m -tlp:default=auto -nologo -restore -nodereuse:false -target:VSTest -nologo --project Tests/Tests.csproj -property:VSTestArtifactsProcessingMode=collect -property:VSTestSessionCorrelationId=8336_fd6066aa-d88a-48e9-8f78-c6c6478911f9 -distributedlogger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,C:\Program Files\dotnet\sdk\9.0.305\dotnet.dll*Microsoft.DotNet.Tools.MSBuild.MSBuildForwardingLogger,C:\Program Files\dotnet\sdk\9.0.305\dotnet.dll'
  Switches appended by response files:
Switch: --project

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions