-
Notifications
You must be signed in to change notification settings - Fork 990
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
Bugfixes from Xunit.StaFact nuget package not consumed #3122
Comments
I've been complaining about the impact of .NET Core targeting libraries that want to include WPF/WinForms that may be applicable being impossible for a long time. I don't know how to solve this problem. How else can (and should) a nuget package that is built with a WPF/WinForms dependency on .NET Core be built? |
@ericstj @danmosemsft @bradwilson appreciate your input, the desktop is pretty much blocked from running certain kinds of theory tests in Visual Studio. |
Afraid I'm the wrong person to ask about this. |
It may be possible that this is related to dotnet/sdk#3254 again, except now this is a build time error. The reason I'm saying this is because the situation with System.Drawing and WindowsBase was kinda similar, they were referenced indirectly but we also wanted to reference the locally built one. It feels similar now, we pull in System.Windows.Forms through the DesktopApp SDK referenced by Xunit.StaFact, but we also ProjectReference it. IMHO the msbuild targets should resolve the conflict in favor of the directly referenced System.Windows.Forms, drop the one from the DesktopApp SDK and note the version inside the deps.json Just speculating though, I have no idea if thats how its supposed to work but there are similarities. |
While I think it would be interesting to pursue the SDK to get this fixed, IMO your case is so very special (no one else will build WinForms while testing it other than this repo), perhaps it's worth it for you to keep your own source copy of |
...and maybe you can consume via git submodule. |
Thanks @AArnott ! I think that's the approach we're going to need to take. Putting this up for grabs for the moment. |
I'll make an attempt for next week |
I've tested locally and got a few general questions before I create a PR:
[edit]
|
I hit this recently too. The answers weren't great though. The crux of the fix was to choose one top-level directory under which to create submodules, and I dropped an .editorconfig file there to suppress all analyzer warnings: But since that didn't work as it should due to dotnet/roslyn#42762, I also had to do this: |
@weltkante very good questions. Please also be aware of #3013 Once I'm done with #3064 I can help you with this one. |
I had a chat with @vladimir-krestov and he said he had success with using https://www.nuget.org/packages/Xunit.StaFact/1.0.31-beta version. |
Yes, I have updated xUnit in the project locally.
The build is successful for me. There are no errors. I'm not sure that I got the correct result because I have problems with running tests in VisualStudio. |
I think this PR (AArnott/Xunit.StaFact#39) fixed it for WinForms as well, nice! I can confirm the framework reference is gone from nuspec and tests work correctly in VS. This basically resolved this issue externally, except you still have to do the actual update :-)
The errors for WinFormsTheory+MemberData were only visible inside VS. Not sure why you can't run tests, works for me. I have to execute |
I had platform issues when I tested the new xUnit version. I used some workaround to run tests in VS. But I have fixed my issues and now it isn't necessary. |
Given the success with the latest version of Xunit.StaFact 1.0.31-beta, I may release as stable. I'll give it a little longer so more folks on this repo can validate and close this issue. |
@weltkante and I observing a new wave of deadlocks. Trying to assert whether these have anything to do with Xunit.StaFact 1.0.31-beta. |
There are two issues with stafact surfacing here, haven't been noticing them since I've been running tests from VS (now that its working)
|
The xunit.stafact bugs @weltkante reported are fixed and available on https://www.nuget.org/packages/xunit.stafact |
Took me a while to figure out but some tests are suddenly executing in parallel when they shouldn't be, created AArnott/Xunit.StaFact#48 [edit] looks like that was a red herring, no idea what it was that was causing the failures, but its gone without having to change anything |
.NET Core Version:
5.0 master
Have you experienced this same bug with .NET Framework?:
not applicable
Problem description:
The nuget package
Xunit.StaFact
used by WinForms had a bug which prevents execution of tests inside VS:VS test error message
The package is referenced in version
0.3.18
and the issue has been brought up and fixed in the origin repository, it is available in nuget package1.0.19-beta
Unfortunately just updating the nuget package doesn't work, because to properly support
WinFormsStaFact
they also added a dependency onFrameworkReference
onMicrosoft.WindowsDesktop.App
to the nuget package.When updating the nuget package this leads to referencing the SDK WinForms in addition to the locally built WinForms, causing conflicts in all test projects.
I have no idea how to properly fix this, but I can work around by dropping all
TransitiveFrameworkReference
obtained from nuget packages to prevent upgrading the SDK to a DesktopApp. No idea what the proper resolution is to consume theXUnit.StaFact
bugfixes, I don't understand the arcade build system.Expected behavior:
Bugfixes for Xunit.StaFact should be consumed
Minimal repro:
Try to run StaTheory or WinFormsTheory with complex MemberData inside Visual Studio
/cc @hughbe @RussKie FYI
The text was updated successfully, but these errors were encountered: