Skip to content
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 test fails due to missing quotes in the call to dotnet exec #231

Closed
TheRealPiotrP opened this issue Nov 17, 2016 · 3 comments
Closed
Assignees

Comments

@TheRealPiotrP
Copy link
Contributor

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: ccc4968bc3

Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64

@Faizan2304
Copy link
Contributor

This has been fixed in test platform side. We will very soon insert new testplatform bits in dotnet/cli

@codito
Copy link
Contributor

codito commented Nov 17, 2016

Isn't the fix already available on dotnet/cli master with dotnet/cli@91708c4?

@TheRealPiotrP
Copy link
Contributor Author

Looks like the fix didn't make it into preview3:
https://github.com/dotnet/cli/blob/rel/1.0.0-preview3/src/redist/redist.csproj#L38

@Faizan2304 Faizan2304 self-assigned this Nov 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants