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

Warn when MSTest.TestFramework and MSTest.TestAdapter versions are not aligned #4337

Open
Youssef1313 opened this issue Dec 13, 2024 · 1 comment

Comments

@Youssef1313
Copy link
Member

Youssef1313 commented Dec 13, 2024

It's not uncommon for projects to end up with MSTest.TestFramework version being not aligned with MSTest.TestAdapter, which is usually not a good idea. We can consider issuing a warning in this case.

Open questions

  • Is the benefit worth it?
  • Any potential false positives?
  • Should we issue a warning only if both packages are explicitly referenced (i.e, direct dependency)? Or should we still issue a warning if TestFramework is transitive while TestAdapter is direct?
  • How should this be implemented?
    • Analyzer? Not going to be widely useful as analyzers are opt-in and many projects don't use it.
    • MSBuild target in TestFramework or TestAdapter package?
    • The new MSBuild Check feature (if it's capable of doing so)?

Example: https://github.com/microsoft/accessibility-insights-windows/blob/54d160cb743a6ab30d3b763b655c7b480af4c85d/src/UITests/UITests.csproj#L17-L18

@Evangelink
Copy link
Member

I'd vote for MSBuild check

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

No branches or pull requests

2 participants