question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MSBUILD : error MSB1008 Only one project can be specified

See original GitHub issue

I’m experimenting same issue (#213), and I think that it’s not a problem with build errors… Tests executes properly on Visual Studio, and the command ‘dotnet test’ executes right too…

My .vscode\settings.json content:

{
    "dotnet-test-explorer.testProjectPath": "*Tests/*Tests.csproj"
}

TestExplorer log output while discovering tests:

Finding projects for pattern c:/work\testexplorerissue/*Tests/*Tests.csproj
Found 1 matches for pattern in folder c:\work\testexplorerissue
Evaluating match c:/work/testexplorerissue/TestExplorerIssue.Lib.Tests/TestExplorerIssue.Lib.Tests.csproj
Adding directory c:/work/testexplorerissue/TestExplorerIssue.Lib.Tests
Executing dotnet test -t -v=q in c:/work/testexplorerissue/TestExplorerIssue.Lib.Tests

Then, in .NET TEST EXPLORER panel you can see: Please, open or set the test project and ensure your project compiles

The problem, I think, is with the execution of dotnet test -t -v=q in c:/work/testexplorerissue/TestExplorerIssue.Lib.Tests command. It throws the following error: MSBUILD : error MSB1008 Only one project can be specified.

Attached, I send you a zipped solution that reproduces it: testexplorerissue.zip

_Originally posted by @Kash0321 in https://github.com/formulahendry/vscode-dotnet-test-explorer/issues/213#issuecomment-511178155_

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:3
  • Comments:10

github_iconTop GitHub Comments

1reaction
laibullecommented, Dec 15, 2020

thanks @hkutluay, I updated my snippets to avoid any wast of time I anyone want to reuse it.

1reaction
laibullecommented, Dec 15, 2020

it works.

Here is how I installed the unpublished extension

git clone git@github.com:formulahendry/vscode-dotnet-test-explorer.git
cd vscode-dotnet-test-explorer
npm install
npm run vscode:prepublish
npm install -g vsce

change vscode engine version in package.json

vsce package
code-insiders --install-extension *.vsix

or if you don’t use the insider version

code --install-extension *.vsix
Read more comments on GitHub >

github_iconTop Results From Across the Web

MSBUILD : error MSB1008: Only one project can be specified
This problem appears when you have a path or a property containing a space and that is not quoted. All ...
Read more >
MSBUILD : error MSB1008: Only one project can be specified.
MSBUILD : error MSB1008: Only one project can be specified. ... Which are all closed as duplicates, one of which is flagged as...
Read more >
error MSB1008: Only one project can be specified. Switch ...
That's an MSBuild error. You are passing the MSBuild command and “scanner end” command on the same line so MSBuild.exe thinks you are...
Read more >
MSBUILD : error MSB1008: Only one project can be ... - MSDN
The error usually comes because of the space in arguments. Try to add the double quotes to path of solution and then try...
Read more >
MSB1008: Only one project can be specified when Directory ...
I ran into an issue where MSBuild generates a misleading error message. I was trying to run MSBuild in a repo with a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found