Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 5
    This solutions works great and it's the one with less code ++1 Commented Nov 9, 2023 at 17:53
  • 6
    If you use a convention, replacing "MyProject.Test" with "$(MSBuildProjectName).Test", this becomes an even better answer. Commented Jun 7, 2024 at 15:17
  • For idiots like me (including, unf, Copilot with GPT 4.1), emphasis on Starting with .NET 5: Framework (4.x) apps need not apply. 😔🤦 Commented Oct 6, 2025 at 14:17