-
Notifications
You must be signed in to change notification settings - Fork 751
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
NETSDK1082 if installed on WinUI project targeting 19041 or higher #1461
Comments
This seems to be causing issues for WinUI 3 support for ReactiveUI. If we can get some progress on this issue that would be good. |
ARM should be supported on net6.0. I don't think much is likely to change before then. |
Even if ARM is supported, referencing WinForms is still a wrong action. |
The -windows TFM brings in all of the Windows API. That's by design. You don't have to use them if you don't want. If you're targeting Windows, then you get the entire surface area. |
Any updates on this issues or plans to resolve it? Thanks in advance and a happy new year |
Does this happen without Resharper installed/enabled? |
Nope and I raised an issue their too, but even without the Resharper issue, we've to carry around ~20MB of dlls we don't need and that would also be true for other types of projects, e.g. a console application, only because they choose to target windows only. Actually it's worse than 20MB, just tried it out and if I publish a self contained project for windows without System.Reactive it's ~80MB, with System.Reactive it's ~175MB. |
@clairernovotny Things are worse in WinUI, since WPF and WinForms are unnecessarily carried for 3 platforms, increasing ~60MB for each platform after installation, and ~20MB in the installer package. |
Strictly speaking, no. WinForms and WPF are opt-in by |
Similar issue #1745
IMO, that's bad idea in general. Not only because of the app size, but the TFM brings a lot of confusion as well. It's enough to look on the amount of issue tickets it produced in this repository. Probably, would vote for separate package for each platform Even if it would mean a less discoverable approach. |
Just for the record, this is now affecting Avalonia users: AvaloniaUI/Avalonia#9549 |
Adding to all of the above that I've just had to make the decision to avoid Rx.NET in one of my projects and implement a subset of observable types myself solely because of this issue. The behavior of pulling in WPF/WinForms for |
@HowardvanRooijen recently took over ownership of this project, so hopefully he can put this on the board to be looked at. Agreed the issue hasn't been great in regards to implied WPF support and has caused issues for ReactiveUI as well. |
Keep an eye on #1868 |
As the recently published roadmap at https://github.com/dotnet/reactive/blob/main/Rx.NET/Documentation/Rx-Roadmap-2023.md#rx-v70 says, fixing this is a primary goal for Rx 7.0. (We're not quite ready to move on that because we have some test failures we've not yet resolved as part of migrating everything over to current SDK and VS versions for Rx 6.0, and those problems need to be fixed before we can move forward on v7.0) We haven't yet finalized a plan for how we will fix the problems described in this issue, but our current thinking is that we need to separate all of the UI-framework-specific code out of the main It's possible that The history behind the decision to unify everything under a single component is complex, and we need to make sure that we don't recreate any of the old problems that the unification was intended to fix. We believe that the ways in which the various .NET runtimes still in support have evolved since that decision was taken means that we won't be reverting to these old problems, but we do need to make absolutely certain of that. |
People running into this issue could try adding this to their project files as a workaround: <PropertyGroup>
<DisableTransitiveFrameworkReferences>true</DisableTransitiveFrameworkReferences>
</PropertyGroup> We think this is a viable workaround. It essentially undoes Rx's attempt to add the unwanted desktop framework reference. In our experiments this is sufficient to prevent the packaging bloat problems. However, if people are finding that this doesn't work, we really want to know because this workaround is provisionally part of our long term plan for fixing this. Our view is that if a viable workaround is available, we don't need to do anything radical in the short term. We can gradually deprecate the use of the UI-framework-specific types that are baked into However in the absence of a viable workaround, radical change may be unavoidable. In that case, we might need to do the thing we really want to avoid: changing the main Rx package, leaving So that's why it would be very helpful for us to know if this workaround doesn't work. |
See here for discussion on DisableTransitiveFrameworkReferences: #2038 (reply in thread) |
Bug
Despite our best efforts, bugs can slip into releases or corner cases forgotten about. We will try our best to remedy the situation
and/or provide workarounds. Note that certain (odd) behaviors are by design and as such are not considered bugs.
System.Reactive 5.0.0
The winui template targets Windows 18362. When installing Rx, everything is OK.
However, if the target platform is set to
net5.0-windows10.0.19041
, msbuild will try to add a FrameworkReference to Microsoft.WindowsDesktop.App, add results in NETSDK1082 for missing arm64 rid.It assumes Windows Desktop support always available on Windows, but it's not the case for ARM64.
The text was updated successfully, but these errors were encountered: