Unable to run tests from CLI
Describe the bug
The dotnet tests don't all execute when running from the commandline. I did a fresh clone of the repo. I'm running Windows 11 and have dotnet 9 installed. I'm getting a lot of errors "error MSB4057: The target "RunTests" does not exist in the project"
Some of the test projects run fine but at a certain point they all start failing. I tried Microsoft.DotNet.Interactive.SqlServer.Tests from within visual studio and that ran fine from there.
I was wondering if the version of arcade being old would impact things. I see that the repo still has 8.0.0-beta.25079.1 set - what should it be now? I tried 9.0.0-beta.24305.5 and got similar behavior. But I'm not sure that's the correct version of 9.x for arcade. I tried looking at a pattern for the projects that ran VS didn't see anything.
Reproduction
git clone https://github.com/dotnet/interactive.git interactive-testbuild cd .\interactive-testbuild ./src/ensure-symlinks.ps1 .\build.cmd -test
Please complete the following:
Which version of .NET Interactive are you using? (In a notebook, run the #!about magic command. ):
- OS
- [X] Windows 11
- [ ] Windows 10
- [ ] macOS
- [ ] Linux (Please specify distro)
- [ ] iOS
- [ ] Android
- Browser
- [X] Not Applicable
- [ ] Chrome
- [ ] Edge
- [ ] Firefox
- [ ] Safari
- Frontend
- [ ] Jupyter Notebook
- [ ] Jupyter Lab
- [ ] nteract
- [ ] Visual Studio Code
- [ ] Visual Studio Code Insiders
- [X] Visual Studio - technically I'm running the preview version, but the tests I tried ran fine there
- [ ] Other (please specify)
Errors
See attached log file for the full build log (paths redacted)
Microsoft.DotNet.Interactive.AspNetCore.Tests succeeded (3.7s) → artifacts\bin\Microsoft.DotNet.Interactive.AspNetCore.Tests\Debug\net9.0\Microsoft.DotNet.Interactive.AspNetCore.Tests.dll
Microsoft.DotNet.Interactive.CSharpProject.Tests succeeded (2.8s) → artifacts\bin\Microsoft.DotNet.Interactive.CSharpProject.Tests\Debug\net9.0\Microsoft.DotNet.Interactive.CSharpProject.Tests.dll
Microsoft.DotNet.Interactive.Jupyter.Tests succeeded (4.2s) → artifacts\bin\Microsoft.DotNet.Interactive.Jupyter.Tests\Debug\net9.0\Microsoft.DotNet.Interactive.Jupyter.Tests.dll
Microsoft.DotNet.Interactive.SqlServer.Tests failed with 1 error(s) (0.0s)
C:\Users\REDACT-WINUSER\.nuget\packages\microsoft.dotnet.arcade.sdk\8.0.0-beta.25079.1\tools\Tests.targets(36,23): error MSB4057: The target "RunTests" does not exist in the project.
Microsoft.DotNet.Interactive.ApiCompatibility.Tests failed with 1 error(s) (0.0s)
C:\Users\REDACT-WINUSER\.nuget\packages\microsoft.dotnet.arcade.sdk\8.0.0-beta.25079.1\tools\Tests.targets(36,23): error MSB4057: The target "RunTests" does not exist in the project.
Microsoft.DotNet.Interactive.Jupyter.Tests failed with 1 error(s) (0.0s)
C:\Users\REDACT-WINUSER\.nuget\packages\microsoft.dotnet.arcade.sdk\8.0.0-beta.25079.1\tools\Tests.targets(36,23): error MSB4057: The target "RunTests" does not exist in the project.
Microsoft.DotNet.Interactive.Telemetry.Tests failed with 1 error(s) (0.0s)
C:\Users\REDACT-WINUSER\.nuget\packages\microsoft.dotnet.arcade.sdk\8.0.0-beta.25079.1\tools\Tests.targets(36,23): error MSB4057: The target "RunTests" does not exist in the project.
dotnet-interactive.Tests failed with 1 error(s) (0.0s)
I would recommend using dotnet test instead.
I'll look into whether the build.cmd script is still needed. I don't believe we call it with the -test switch if so.