Upgrade xunit.runner.visualstudio to 3.0.2#15651
Conversation
ViktorHofer
left a comment
There was a problem hiding this comment.
Nearly all of the netfx test projects in runtime target net462. This change will break them. Please try this out in runtime.
FWIW the recommended fix that Brad told is to make sure that xunit.console and xunit.runner.visualstudio aren't both put into the app output directory.
|
I think if I remember correctly it wasn't about having both files but referencing different versions. I'll try it out in runtime. |
|
xunit.console isn't present under the runtime/artifacts directory. @akoeplinger @ViktorHofer let me know if you want me to try something. |
See dotnet/runtime#94183 (comment).
I thought that we fixed this in runtime. cc @ericstj |
This is what is there: The |
|
@ViktorHofer I think that issue is a different one. I did try this change in runtime and it indeed fails due to the net472 vs net462 TFM mismatch. I verified it does work in VS with the new package version though if we'd change the TFM to net472. I pushed a change to only use the new version when TargetFrameworkIdentifier != .NETFramework. Note that we'll have the same issue in the future if we upgrade to xunit v3 since it also targets net472. |
| <XUnitRunnerVisualStudioVersionForNetFramework Condition="'$(XUnitRunnerVisualStudioVersionForNetFramework)' == '' and '$(XUnitRunnerVisualStudioVersion)' == ''">2.8.2</XUnitRunnerVisualStudioVersionForNetFramework> | ||
| <XUnitRunnerVisualStudioVersionForNetFramework Condition="'$(XUnitRunnerVisualStudioVersionForNetFramework)' == '' and '$(XUnitRunnerVisualStudioVersion)' != ''">$(XUnitRunnerVisualStudioVersion)</XUnitRunnerVisualStudioVersionForNetFramework> | ||
| <XUnitRunnerVisualStudioVersion Condition="'$(XUnitRunnerVisualStudioVersion)' == ''">3.0.2</XUnitRunnerVisualStudioVersion> |
There was a problem hiding this comment.
Consider adding a comment explaining the split. Can this get reverted at some point?
There was a problem hiding this comment.
Will add a comment. This can get reverted once we no longer need to support < net472 TFMs that use the package since I tested the new package works fine on net472+.
I'm actually not sure how many repos besides runtime would hit this.
There was a problem hiding this comment.
I spoke with others offline and we believe it's fine to update the .NET Framework tests in runtime to net481 (NetFrameworkCurrent). I agree that this should be done anyway to allow the usage of xunit v3.
Even though the tests target net462, the actual runtime used is always net481 on our local boxes and on CI. The quirk behavior might be slightly different but tests will highlight that.
I might look into this when I have some time.
|
Is this good to merge? |
|
@ViktorHofer do you still want to go with the separate versions for the arcade defaults or should we just use the new version once dotnet/runtime#113667 is in? |
|
I would consolidate the versions and then follow-up with the repos that have .NET Framework tests (at least the VMR repos). |
|
Thank you for looking into this @ViktorHofer and @akoeplinger! |
Should help with dotnet/runtime#60550 (comment)
/cc @tmds