-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Describe the bug
dotnet test works fine but dotnet watch test doesn't execute any tests.
To Reproduce
Create a failing test (using docker below)
docker run --rm -it --name dotnet8-watch mcr.microsoft.com/dotnet/sdk:8.0.100-preview.7-jammy bash
mkdir /app && cd $_
dotnet new xunit
cat > UnitTest1.cs <<- EOF
namespace app;
public class UnitTest1
{
[Fact] public void Fail() => Assert.True(false);
}
EOF
dotnet watch test just sits with something like the following:
dotnet watch : Polling file watcher is enabled
dotnet watch : Hot reload enabled. For a list of supported edits, see https://aka.ms/dotnet/hot-reload.
Press "Ctrl + R" to restart.
dotnet watch : Building...
Determining projects to restore...
All projects are up-to-date for restore.
/usr/share/dotnet/sdk/8.0.100-preview.7.23376.3/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.RuntimeIdentifierInference.targets(314,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [/app/app.csproj]
app -> /app/bin/Debug/net8.0/app.dll
dotnet watch : Started
dotnet watch : Exited
dotnet watch : Waiting for a file to change before restarting dotnet...
Works fine in dotnet 7 (mcr.microsoft.com/dotnet/sdk:7.0-jammy)
Exceptions (if any)
Further technical details
- Include the output of
dotnet --info.NET SDK: Version: 8.0.100-preview.7.23376.3 Commit: daebeea8ea Runtime Environment: OS Name: ubuntu OS Version: 22.04 OS Platform: Linux RID: ubuntu.22.04-x64 Base Path: /usr/share/dotnet/sdk/8.0.100-preview.7.23376.3/ .NET workloads installed: There are no installed workloads to display. Host: Version: 8.0.0-preview.7.23375.6 Architecture: x64 Commit: 65b696cf5e RID: linux-x64 .NET SDKs installed: 8.0.100-preview.7.23376.3 [/usr/share/dotnet/sdk] .NET runtimes installed: Microsoft.AspNetCore.App 8.0.0-preview.7.23375.9 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 8.0.0-preview.7.23375.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Other architectures found: None Environment variables: Not set global.json file: Not found - The IDE (VS / VS Code/ VS4Mac) you're running on, and its version
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area-Watchdotnet-watchdotnet-watch