-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
System.Reactive reference pulls in all of WPF/SWF when TFM is net7.0-windows10.0.19041.0
or higher
#9549
Comments
Yes, that's a problem with the System.Reactive, and we can't do much about it, unfortunately. Developers can exclude some references from being copied to the output directory, something like The best I can advice - make more noise in the System.Reactive repository, bringing up seriousness of this problem. |
Or we might actually try to remove this dependency at all. I will try and see this week. Hopefully, it won't affect any public API. |
Well, we use ISubject in the public API unfortunately. It should be considered when bindings API cleanup is done: #9512. |
Out of interest, did you ever try this: <PropertyGroup>
<DisableTransitiveFrameworkReferences>true</DisableTransitiveFrameworkReferences>
</PropertyGroup> This disables the NuGet behaviour in which your project automatically acquires I tested this on a I know you've already abandoned Rx.NET, but our goal is to get Rx.NET into a state where you could reasonably come back to it if you chose to do so. We're trying to find a path forward for undoing the "great consolidation" in which the WPF and Windows Forms functionality got bundled into If this |
@idg10 it could work, yes. But as for now, there is very little need for |
Consider this empty console app project:
If you do
dotnet build
and take a peek inbin/Debug/net7.0-windows10.0.19041.0/win10-x64
, you'll notice something curious:Interestingly, changing TFM to
net7.0-windows10.0.18362.0
(or lower) does not pull in WPF/SWF. The same is of course true when changing TFM to simplynet7.0
or similar.After some
project.assets.json
detective work, I figured out why:https://github.com/dotnet/reactive/blob/85f1eb7c53e27cccdbeee3e0b044916168843fcc/Rx.NET/Source/src/System.Reactive/System.Reactive.csproj#L3-L21
As you can see, System.Reactive is multitargeted for
net5.0
andnet5.0-windows10.0.19041
, with the latter TFM pulling in all of WPF/SWF. 🤦In an ideal world, the fix here would be for System.Reactive to not assume that a
windows
TFM necessarily impliesUseWPF=true
andUseWindowsForms=true
. But judging by this upstream issue, it doesn't seem like anything is likely to change here anytime soon, despite this assumption being obviously wrong. I'm not sure what, if anything, can be done on the Avalonia side.The text was updated successfully, but these errors were encountered: