Giter Site home page Giter Site logo

Referencing the Microsoft.NET.Test.Sdk NuGet package did NOT fix this issue for `dotnet test` commands. They are still failing in build environments. about sdk HOT 4 CLOSED

nohwnd avatar nohwnd commented on June 13, 2024
Referencing the Microsoft.NET.Test.Sdk NuGet package did NOT fix this issue for `dotnet test` commands. They are still failing in build environments.

from sdk.

Comments (4)

dotnet-issue-labeler avatar dotnet-issue-labeler commented on June 13, 2024

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

from sdk.

nohwnd avatar nohwnd commented on June 13, 2024

Do you have a simple repro of the problem please? Are you referencing the full Microsoft.TestPlatform package because you need to find the runner afterwards? How exactly are you running your tests? Is it via dotnet test of through vstest.console.exe from the referenced Microsoft.TestPlatform package?

from sdk.

robertmclaws avatar robertmclaws commented on June 13, 2024

Here's a repro branch and build where the error happens:
https://github.com/simple-odata-client/Simple.OData.Client/actions/runs/8462294502/job/23183433497?pr=929#step:6:31

Of note, the project Simple.OData.Tests.Shared.NorthwindService is NOT a unit test project. However, the only way to make this issue go away is to add those two test packages to this non-test project, as I did here: https://github.com/simple-odata-client/Simple.OData.Client/actions/runs/8447531397/job/23138040282.

Then the build will execute properly.

The codebase in question uses Directory.Build.props to pull the two packages above into the other test projects.

Lemme know if you have any questions. Thanks!

from sdk.

nohwnd avatar nohwnd commented on June 13, 2024

Your directory build props mark the project as IsTestProject which is used by the VSTest build target to either run or skip tests. This is normally used to suppress running test projects when they have all the dependencies (like Microsoft.NET.Test.SDK) but don't hold any tests. You are facing the problem from the other side.

from sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.