Description
Moving from https://github.com/dotnet/cli/issues/4744 on behalf of @chausner [and others].
Steps to reproduce
Create a new, empty xUnit project and attempt to run it:
dotnet new -t Xunittest
dotnet restore
dotnet test
Expected behavior
Test should complete with zero passing and zero failing tests.
Actual behavior
dotnet test
outputs:
Test run for c:\Users\chris\Desktop\test\bin\Debug\netcoreapp1.0\test.dll(.NETCoreApp,Version=v1.0)
dotnet exec needs a managed .dll or .exe extension. The application specified was 'C:\Program'
Process Monitor shows that dotnet test
fails to quote the path to vstest.console.dll when running dotnet exec
internally:
"dotnet" exec C:\Program Files\dotnet\sdk\1.0.0-preview3-004056\vstest.console.dll --framework:".NETCoreApp,Version=v1.0" "c:\Users\chris\Desktop\test\bin\Debug\netcoreapp1.0\test.dll"
Running the command by hand with the path correctly quoted, runs the tests successfully.
Environment data
dotnet --info
output:
.NET Command Line Tools (1.0.0-preview3-004056)
Product Information:
Version: 1.0.0-preview3-004056
Commit SHA-1 hash: ccc4968bc3Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64