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

Add experimental MSBuild sdk project #1864

Merged
merged 5 commits into from
Dec 4, 2023
Merged

Add experimental MSBuild sdk project #1864

merged 5 commits into from
Dec 4, 2023

Conversation

MarcoRossignoli
Copy link
Contributor

@MarcoRossignoli MarcoRossignoli commented Dec 1, 2023

This PR is adding the first version of the MSBuild sdk for MSTest, it could be interesting mainly for:

  • add or remove dependencies without the needs to ask to the user to do it, we know that's not easy to flow new features that needs new dependency to the users, they've to read the documentation but it's hard to reach everyone.
  • we can provide simple msbuild props knob to disable/enable features.
  • we can have better "testing coverage" because we can always test "our" configurations and guarantee that everything is good, having less "moving parts", users will add dependencies only for their business code.
  • it's battle tested and used by other well known .NET platform to simplify the "default usage" https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview#available-sdks

The outcome will be a project file like:

<Project Sdk="MSTest.Sdk/3.2.0-dev">
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <!--<UseMSTestRunner>false</UseMSTestRunner>-->
    <!--<TestingPlatformDonetTestSupport>true</TestingPlatformDonetTestSupport>-->
  </PropertyGroup>
</Project>

The sample above is using the version inside the Sdk attribute self but it can be done "globally" using the global.json too like described here https://learn.microsoft.com/en-us/visualstudio/msbuild/how-to-use-project-sdk
Cons: the version needs to be coherent with the packages, it could be confusing have different custom versioning for the sdk.

src/Package/MSTest.Sdk/Sdk/Sdk.props Outdated Show resolved Hide resolved
src/Package/MSTest.Sdk/Sdk/Sdk.props Outdated Show resolved Hide resolved
src/Package/MSTest.Sdk/Sdk/Sdk.targets Show resolved Hide resolved
@Evangelink
Copy link
Member

I love it!!! That will be an awesome addon to MSTest and the best way for us to drive adding/prodiving more features to users.

@MarcoRossignoli MarcoRossignoli merged commit 8e4df46 into main Dec 4, 2023
6 checks passed
@MarcoRossignoli MarcoRossignoli deleted the dev/mr/sdk branch December 4, 2023 10:52
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

Successfully merging this pull request may close these issues.

2 participants