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.

`dotnet test` command error when building new project

See original GitHub issue
Testhost process for source(s) '/workspaces/DualSourceAdapter/test/DualSourceAdapter.Tests/bin/Debug/net7.0/DualSourceAdapter.Tests.dll' exited with error: Error:
  An assembly specified in the application dependencies manifest (DualSourceAdapter.Tests.deps.json) was not found:
    package: 'FSharp.Core', version: '7.0.300'
    path: 'lib/netstandard2.1/FSharp.Core.dll'
. Please check the diagnostic logs for more information.

here is a reference for repro , run dotnet test : https://github.com/jkone27/DualSourceAdapter

Issue Analytics

  • State:closed
  • Created a month ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
baronfelcommented, Aug 17, 2023

A bit of clarity - the Microsoft.NET.Test.Sdk PackageReference is what drives the integration with dotnet test - no project without it is reasonably expected to work here. It’s technically possible to make a project without this reference function with dotnet test, but you’d have to set a number of MSBuild knobs yourself that aren’t super well-documented.

In .NET (as opposed to Framework), libraries don’t get their dependencies copied to outputs, so a test app (which needs outputs!) needs to be classified as an Executable. The Test SDK does this (and several other things) to make sure that tests execute the way that users expect.

1reaction
vzarytovskiicommented, Aug 17, 2023

It looks like it’s testhost issue, with loading assemblies? Should it be transferred to vstest?

@nohwnd @Evangelink can you folks please help us figuring out what’s the problem?

Update: it doesn’t work with 8p7 either

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet test command - .NET CLI
The dotnet test command is used to execute unit tests in a given project.
Read more >
dotnet test command started failing with MSBuild 17.4
MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file. When...
Read more >
Intermittent build failure with "Build FAILED" after "dotnet ...
Occasionally we have build fail at the end of a step that runs dotnet test (.NET Core 2.1 or 3.1 unit tests using...
Read more >
Unable to test dotnet project
I'm trying to run dotnet test on a solution and unable to. pipeline: image : mcr.microsoft.com/dotnet/sdk:6.0 pipelines : default : - step ...
Read more >
Dotnet test/restore fail in VSTS
This is the error I am receiving: C:\Program Files\dotnet\sdk\2.0.0\NuGet.targets(102,5): error : Failed to retrieve information about ...
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