GithubHelp home page GithubHelp logo

Comments (6)

MarcoRossignoli avatar MarcoRossignoli commented on June 2, 2024 2

That did the trick - maybe worth calling out in some documentation somewhere? I originally just copy-pasted from the samples in the blog post.

Good idea, it's in the note box under the code sample https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-mstest-sdk but looks like is not super clear, thanks for the suggestion.

from testfx.

martincostello avatar martincostello commented on June 2, 2024 1

That did the trick - maybe worth calling out in some documentation somewhere? I originally just copy-pasted from the samples in the blog post.

from testfx.

Evangelink avatar Evangelink commented on June 2, 2024 1

TODOs:

  • Update doc to make it clearer that global.json can be used and provide a full example
  • Make it clear this is the recommended pattern
  • Update SDK sample to add the global.json case

from testfx.

Evangelink avatar Evangelink commented on June 2, 2024 1

@martincostello I will move on this ticket as completed as the docs and samples have been added/edited.

from testfx.

MarcoRossignoli avatar MarcoRossignoli commented on June 2, 2024

Somehow allow the SDK to be loaded/referenced without an explicit version number by loading it from the package reference (e.g. from ).

Hi @martincostello, the MSBuild sdk versioning doesn't allow the usage of the NuGet Central Package Version Management

As you can see here https://github.com/microsoft/testfx/tree/main/src/Package/MSTest.Sdk/Sdk an MSBuild SDK is a bunch of props/targets that we compose (for instance this is the main file https://github.com/microsoft/testfx/blob/main/src/Package/MSTest.Sdk/Sdk/Runner/ClassicEngine.targets).

So it's not easy have 1 version for everything because the imports will import more packages with different versions. So our 3.1.1 sdk actually is the "version" of MSTest from feature perspective but it's composed by more packages from different part of the platform and with different versions. For instance the new testing platform(https://github.com/microsoft/testfx/blob/main/docs/testingplatform/Index.md) that empower the runner is at the moment at version 1.1.0.

The only way at the moment to centralize the version at solution level is to use the global.json as explained here https://learn.microsoft.com/en-us/visualstudio/msbuild/how-to-use-project-sdk?view=vs-2022#how-project-sdks-are-resolved

When the version is missing the resolver goes to the default installed MSBuild sdks (i.e. C:\Program Files\dotnet\sdk\8.0.104\Sdks) or to NuGet(available feeds) using the version specified inside the global.json.

from testfx.

martincostello avatar martincostello commented on June 2, 2024

Thanks for the information - I'll have a look to see if adding the SDK in global.json works.

from testfx.

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.