|
| 1 | +--- |
| 2 | +title: Core Framework v3 3.0.0-pre.40 |
| 3 | +title-version: 2025 July 6 |
| 4 | +logo-title: true |
| 5 | +css: release-notes.css |
| 6 | +--- |
| 7 | + |
| 8 | +Today, we're shipping one new prerelease: |
| 9 | + |
| 10 | +* **xUnit.net Core Framework v3 `3.0.0-pre.40`** |
| 11 | + |
| 12 | +As always, we'd like to thank all the users who contributed to the success of xUnit.net through usage, feedback, and code. 🎉 |
| 13 | + |
| 14 | +## Release Notes |
| 15 | + |
| 16 | +These release notes are a list of changes from `3.0.0-pre.25` to `3.0.0-pre.40`. |
| 17 | + |
| 18 | +### Core Framework |
| 19 | + |
| 20 | +* We have added a generic version of `ClassDataAttribute` so that you can replace `[ClassData(typeof(MyData))]` with `[ClassData<MyData>]`. Note that this is only supported on .NET, as .NET Framework does not support generic attributes. [xunit/xunit#2945](https://github.com/xunit/xunit/issues/2945){: .issue-link } |
| 21 | + |
| 22 | +* When we try to create custom attributes and it fails, we are now logging these failures via diagnostic messages. Some cases where this is most likely to happen is while registering serializers (with `[RegisterXunitSerializer]`), creating test collection factories, creating `BeforeAfterTestAttribute` instances, creating test case/collection orderers, collecting traits, among others. These new warning messages come due to a change made to way attributes are constructed in `3.0.0-pre.25` in an attempt to make attribute constructor exceptions be less system-breaking. |
| 23 | + |
| 24 | +* We have added two overloads to `TestContext.Current.AddAttachment` to allow developers to overwrite an existing attachment. The existing overloads will continue to throw when attempting to add an attachment when one already exists with the given name. [xunit/xunit#3340](https://github.com/xunit/xunit/issues/3340){: .issue-link } |
| 25 | + |
| 26 | +* **BUG:** We have fixed an issue where the `CaptureConsole` and `CaptureTrace` attributes were not usable in some circumstances. [xunit/xunit#3334](https://github.com/xunit/xunit/issues/3334){: .issue-link } |
| 27 | + |
| 28 | +* **BUG:** We have fixed an issue where F# modules with `,` in their name were causing parsing issues during type deserialization, causing them to be non-runnable in Visual Studio. [xunit/xunit#3332](https://github.com/xunit/xunit/issues/3332){: .issue-link } |
| 29 | + |
| 30 | +* **BUG:** We have fixed an issue where it was possible for us to generate two Microsoft Testing Platform log files with the same filename in some rare conditions. [xunit/xunit#3333](https://github.com/xunit/xunit/issues/3333){: .issue-link } |
| 31 | + |
| 32 | +* **BUG:** `TestContext` was not being properly disposed, which caused a memory leak of disposable objects it contains (in particular, the cancellation token sources). [xunit/xunit#3323](https://github.com/xunit/xunit/issues/3323){: .issue-link } |
| 33 | + |
| 34 | +### Assertion Library |
| 35 | + |
| 36 | +* **BUG:** We have fixed an issue with `Assert.EquivalentWithExclusions` where it would ignore properties too aggressively, leading to potential false positives. [xunit/xunit#3338](https://github.com/xunit/xunit/issues/3338){: .issue-link } |
| 37 | + |
| 38 | +### Packages |
| 39 | + |
| 40 | +* We have removed an MSBuild property (`<IsTestProject>true</IsTestProject>`) from the `xunit.v3.core` NuGet package, in anticipation of some changes that are being made by the VSTest team. [dotnet/sdk#49063](https://github.com/dotnet/sdk/issues/49063){: .issue-link } |
0 commit comments