-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Update xunit templates to xunit.v3 #50117
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the xUnit templates to use xUnit v3 by replacing the xunit package references with xunit.v3 across all project templates and adding Microsoft.Testing.Platform configuration guidance.
Key Changes
- Updated package references from
xunit
version 2.9.3 toxunit.v3
version 3.0.0 - Added commented configuration options and documentation for Microsoft.Testing.Platform integration
- Applied changes consistently across C#, F#, and Visual Basic project templates
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
Company.TestProject1.csproj | Updated C# xUnit template with v3 package and Microsoft.Testing.Platform documentation |
Company.TestProject1.fsproj | Updated F# xUnit template with v3 package and Microsoft.Testing.Platform documentation |
Company.TestProject1.vbproj | Updated VB xUnit template with v3 package and Microsoft.Testing.Platform documentation |
...crosoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/Company.TestProject1.fsproj
Outdated
Show resolved
Hide resolved
Is there any reason these templates shouldn't be exactly what we're shipping in |
What I'm saying here is: I like my templates a lot better than yours. Shipping them was not just a holdover waiting for you to update yours. |
...crosoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/Company.TestProject1.csproj
Outdated
Show resolved
Hide resolved
...crosoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/Company.TestProject1.csproj
Outdated
Show resolved
Hide resolved
@bradwilson Is it better now? Any other concerns you have with the current shape? Maybe we could add |
I would love for you to include a default |
I agree! |
We also ship templates for extension authors, but I'm guessing that's probably beyond scope for inclusion here (which means we'll still end up shipping our templates; that'll need to be true until net8 is out of support anyways, since these new templates are only going in the net10 SDK). |
For the {
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json"
} Along with this in the project file: <ItemGroup>
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup It's applicable to all languages. |
Fixes #45645