meziantou / Meziantou.Xunit.ParallelTestFramework

Run xUnit test cases in parallel
MIT License
156 stars 6 forks source link

Duplicate 'Xunit.TestFramework' attribute #16

Closed travbeamo closed 2 months ago

travbeamo commented 2 months ago

When using both of the following packages:

The following error is generated when trying to build project in Visual Studio:

Duplicate 'Xunit.TestFramework' attribute

Related Xunit Issue: https://github.com/xunit/xunit/issues/2949

meziantou commented 2 months ago

You can only declare one TestFramework attribute. If you want, you can disable the one generated by this project by setting an msbuild property. But the tests won't run in parallel as the test framework won't be registered.

<PropertyGroup>
  <IncludeMeziantouXunitParallelTestFramework>false</IncludeMeziantouXunitParallelTestFramework>
</PropertyGroup>>