Skip to content
· 56 min watch
Ian Griffiths By Ian Griffiths Technical Fellow I

Ian Griffiths discusses the current state of Rx.NET, its challenges, and plans for v7.0 in this hour-long talk.

About this talk

Rx.NET

Rx.NET v6.0 was released in 2023. The free Introduction to Rx.NET book was released in 2024, but progress has stalled since then. In this hour long "state of the nation" talk, lead maintainer, Ian Griffiths, delves into the details, hidden complexities and the various options on the table, current progress and plans for Rx.NET v7.0.

Contents:

  • 00:06 - We've stalled
  • 01:38 - The big issues
  • 02:58 - Packaging
  • 03:03 - Packaging problems
  • 05:31 - Deep dive into packaging
  • 08:48 - Packaging problems continued
  • 09:16 - Deep dive into packaging continued
  • 10:17 - Packaging problems continued
  • 18:17 - Self-contained bloat on Windows
  • 18:49 - Nuget.org example
  • 21:36 - Self-contained bloat on Windows continued
  • 24:12 - Difficulties fixing packaging problems
  • 25:18 - Why a "clean break" doesn't work
  • 27:04 - Rx packaging "gauntlet"
  • 31:20 - I wouldn't be starting from here
  • 33:35 - What are we doing about packaging?
  • 35:08 - Option 1: workaround
  • 36:39 - Option 2: split packages
  • 38:13 - UWP
  • 38:27 - UWP (aka uap10.0)
  • 42:59 - What I'd like to do with UWP
  • 43:54 - WASM
  • 44:01 - WASM problems
  • 46:37 - AsyncRx.NET
  • 46:58 - AsyncRx.NET status
  • 48:13 - System.Linq.Async
  • 48:19 - Separation of System.Linq.Async
  • 51:26 - TFM misperceptions
  • 51:35 - Perception of non-support for .NET 8.0
  • 51:57 - nuget.org example
  • 52:54 - Perception of non-support for .NET 8.0 continued
  • 54:04 - Why we will update the TFM anyway
  • 54:07 - Backlog
  • 54:19 - What about actual meaningful progress?
  • 55:19 - Conclusion

This talk was given during endjin's internal weekly "show & tell" meeting, but has been edited for public consumption.

Read the transcript

We've stalled

Where are we right now with Rx at this point in the end of May 2025? So, I'm going to start with the elephant in the room, which is the fact that we've stalled a bit. 2023 was great. I think we took the project that was stuck on like an old version of Visual Studio, wouldn't actually build with the current build tools, dragged it into the present day world, got a new release out the door that was specifically supporting Rx.NET 6, and that was Rx version 6. That came out in May of 2023.

We also got the first preview of AsyncRx.NET out of the door. 2024 we did a lot of work but almost all of it was focused on getting the documentation up to date. So what started as a let's refresh the Intro to Rx book turned into a let's more or less rewrite that kind of from scratch almost. So everything I looked at needed attention. So the thing essentially became a whole new book project.

So that was what took most of 2024 and there was some discussion about what we're going to do with various problems but no actual delivered progress on that. We had some minor updates and bug fixes. If you weren't paying attention to the book, it looked like we didn't do much last year and then this year so far it's been very light. We haven't really put anything out in public yet. And I'm going to talk about why that is, what's been going on that has caused the progress, the visible external progress, to stall a bit.

The big issues

Here's what's going on. There are a bunch of issues affecting Rx at the moment. So the big one which I'm going to talk about in more detail is some very long-standing issues around how Rx is packaged and various problems that causes for various different kinds of applications. But there are some other issues. UWP is a bit of a nightmare and continues to be a nightmare and it's hard to solve that properly, but it's a problem that is continuing to cause friction and it's one of the reasons that things are... we haven't quite resolved how to deal with that. So that's another thing that's slowing us down.

WASM is an interesting one. People are trying to use it and we did a little bit of work to support it, but there are some problems with that that are to do with tooling that I'm going to talk about as well. I'm going to talk about what needs to happen for AsyncRx.NET to get further than it is. I'm also going to talk a bit about the fact that the LINQ to async enumerable code is being moved into .NET proper. I'm going to talk a little bit about target framework monikers and how people misunderstand them. And I'm going to talk about the backlog of actual feature development work which is sitting behind all of this stuff.

Packaging problems: Rx in plug-ins

Start the big one, packaging. There is a very long-standing problem in Rx, has been here since more or less the dawn of time. Sorry, the dawn of Rx, which in my head are the same thing. And it's to do with using Rx in plugins. Plugins present a particular problem because if you have Visual Studio with a bunch of extensions installed, you've actually got multiple completely unrelated build processes that happen that all end up with their outputs running in the same process.

So, Visual Studio was obviously built by Microsoft. A plug-in written by company A was built by that company. A plug-in written by company B was built by a different company. Each of these things ran its own build process. Which means that if you've got one copy of Visual Studio hosting two extensions, two plugins, you had three builds. Visual Studio itself was built, plug-in one was built, plug-in two was built, and all three of those build processes would have made their own decisions about how to resolve package references.

So if both of those plugins use Rx, both of those plugins will have chosen a specific DLL or set of DLLs to deploy with their baked in copy of Rx because the way plugins work in Visual Studio and most .NET plug-in systems is that you bring a copy of all the stuff you need. So you don't say, I'm a plug-in and I rely on this NuGet package. There's no NuGet package resolution at plug-in load time. That's not how plug-in systems work. Instead, you say, "Here are all the files I need to run."

So, essentially, a plug-in is just like an application in the sense that you build a directory containing all of your code and all the other DLLs and other files that you depend on. Everything that you need to run gets packaged into a folder and that's what then gets deployed into the host application. And so, if two plugins both use Rx, both plugins will bring a copy of Rx. And here's where the problem emerges.

Deep dive into packaging

It's possible for two different plugins to both use the same nominal version of Rx. Let's say they're both using Rx 3.0, but to copy slightly different actual binaries. How can that happen? Let me quickly go to the NuGet website. I say quickly... Oops, that was literally the thing I wanted. System.Reactive 3. And that's actually a meta package. So if we go to, let's say, System.Reactive.Linq, that's where all the operators were in version 3.0 of Rx.

And if we take a look inside this with the online NuGet package explorer, then the lib folder says here's the version of Rx to use if you're running on .NET version 4.5. Here's the version to use if you're running on .NET 4.6. Here are some other versions offering various .NET Standard flavors if you're not running on either of the above, but you are running on some runtime that supports one of these flavors of .NET Standard. All of these have the exact same assembly name and version number.

So this is the net45 build and it's called System.Reactive.Linq version 3.0.0.0, culture neutral, with that public key token. And that's literally precisely the same name as this one here which is the 46 version, but they're different. The code is not the same in these two. There is not much difference but there is a subtle difference to do with the handling of cancellation tokens during failure. That means you can tell the difference between which you've got.

And in other cases, they're actually bigger differences. So the difference between the .NET 46 edition of this DLL and the .NET Standard one is actually a bit bigger because there's some things that just aren't in the .NET Standard things. So there are several different targets of what is logically the same version of a LINQ component. And that causes a problem because if you have one plugin that was built to target 45, it's going to ship a copy of this net45 System.Reactive.Linq DLL in its build output. And if you have a different plug-in that supports .NET 46, it's going to ship a copy of this one.

So what happens if both of those plugins get loaded into, say, Visual Studio 2022, which is actually running .NET 4.8.1? And the answer is whichever one loads first gets to load its copy of LINQ and then the .NET assembly resolver says we already have System.Reactive.Linq version 3.0.0.0 with this public key token. So anyone else who asks for it will get the copy I just loaded and it will never ever load that one. And if the plugin that was built against 46 loads first, then this is the one that gets loaded. The 46 copy of System.Reactive.Linq loads and nothing will ever load the other version.

And this is a problem if you have a later plugin, a plug-in built against a later framework that depends upon the availability of stuff that was only in this second one, but it ends up running against the first DLL because some older plug-in loaded first. That's the bug basically, because we have multiple assemblies that all have the same name and the same version that are literally the same as far as the assembly resolver is concerned and yet which are not actually the same because they contain different code. And because each of these could conceivably be loaded by .NET Framework 4.8.1, it's capable of running any of those DLLs, that means whichever loads first is the one that all subsequent plugins get and that can result in errors at runtime.

You can get code saying like a missing type exception or a missing method exception because it was built against a slightly different DLL than the one it actually got at runtime. So this was around for the first like three versions of .NET and then... sorry, first three versions of Rx, and then in 2016 the Rx team tried to fix this.

The Rx 3.1 version number workaround

So in Rx version 3.1 there was a change in how this actually worked. And in fact I can show you that if I bring this back onto the screen. If I say rather than looking at Reactive Linq 3.0.0.0 we do Reactive Linq 3.1.0. This is the version in which the then Rx team attempted to fix this. We've still got a similar breakdown. We still support two different versions of .NET Framework. But if you look at the version number, the net451 has version 3.0.1000.0. But if I look at the .NET 46 version, it has 3.0.3000.0.

From an assembly name perspective, they are technically different components. And that means the .NET runtime will happily load both of them. Says if component A wants this version, component B wants that version, both of them can load. Completely different from the rules that apply with .NET. This is the .NET Framework rules. .NET's a completely different kettle of fish. It has a completely different solution for handling this problem. So we don't really care about it that much.

But .NET Framework, this was the workaround in the Rx 3.1 era. And I've labeled that as step one on my unfortunate sequence of events because that turned out to cause way more problems than it fixed, because you could end up with different libraries you used depending on different other libraries that depended on Rx indirectly and you could actually end up with conflicting versions. You could say, "Okay, this actually wants version 3.0.1000 and version 3.0.3000," and you'd end up with two copies of Rx loaded when you really didn't want that in a single application.

So although this fixed the plug-in situation, it actually broke certain application scenarios that didn't care about plugins. So in a way the cure was worse than the disease. So that was a problem.

The great unification in Rx 4

So then in Rx 4 the great unification happened. So the great unification is the phrase we use internally to describe the decision to compile all of Rx into one great big DLL, cuz before that when you took a reference to Rx you were referencing a NuGet package that was actually a meta package. It had no code in it. It said, oh, you want Rx, right, you'll need these four other components over here. It would say you're going to need System.Reactive.Core, System.Reactive.Interfaces, System.Reactive.Linq and some other stuff.

And this confused people, but it also kind of exponentially increased the opportunities for getting assembly binding problems. And to get Rx working, you had to first of all form a detailed understanding of how your build had gone wrong and then craft assembly binding redirects to fix it. And it was essentially off-putting. It was the reason people were not using Rx, is because you just couldn't get it to work unless you really learned a great deal about things you shouldn't have to care about.

So the thinking behind the great unification is if there's literally just one DLL, so when you reference the System.Reactive NuGet package, you just get one DLL in there and that is the DLL for Rx, then life is much simpler. And this was true in 2017 when they released it. They also at the same time backed out the version number hack that I described. So, Rx version 4.0, all different flavors of Rx, the .NET Standard one, the .NET FX one, there might be a UAP one in there by then as well. They all have exactly the same version number, and I can't quite tell why that decision was made.

I've been unable to find the history behind why they thought it was okay to go back to the old versioning scheme, other than the versioning scheme was part of what was causing people problems, and unifying the DLL should actually have eradicated that. But as far as I can tell, they seem to be under the impression that this great unification would also solve the original problem. Actually, it didn't.

Now, as it happens, version 4 of Rx did not exhibit this original plug-in problem. But that was a happy accident to do with the specific combination of runtimes it targeted. It turned out that at that moment in time with the combination of targets that Rx happened to offer, it was not possible to create a situation where you ran into the plug-in problem. It had just to do with the fact that if you're running on any particular version of .NET, you could only possibly be using one specific target of Rx. And so the conflicts just couldn't actually arise. It was literally impossible for them to arise.

But that was just a coincidence. And I can say that with confidence because in Rx 5 the problem recurred. It actually came back because that happy confluence of coincidences went away and the original bug all of this was meant to fix actually regressed. It came back.

.NET Core 3.0: WPF, Windows Forms and self-contained deployment

In between that though another thing happened. .NET Core 3 shipped in between Rx 4 shipping and Rx 5.0 shipping. And in .NET Core 3.0 two, two and a half important things happened, two or three depending how you count it. WPF and Windows Forms became available in .NET Core form. That's one or two things depending on how you look at it. The UI frameworks that used to be only available in .NET Framework were now available in .NET Core as well. That's one thing. Didn't change Rx at the time but it went on to have ramifications.

And the other thing that was introduced in .NET Core 3.0 was self-contained deployment. And this is the ability to tell the .NET build system that you want it to build an output that contains literally everything that is required to run, including a copy of the .NET runtime if you need it and including any optional installable frameworks like ASP.NET Core or Windows Forms or WPF. So if you say I want to build a self-contained deployment of a Core 3 WPF app, when you build it, it doesn't just build your code. It also makes a complete copy of the whole CLR, the whole runtime and the whole of WPF and all of that gets put in the output folder so that when you copy that folder onto another machine, it just works.

You don't need to install anything on the target machine to make it work because the self-deployed output contains a copy of .NET, contains a copy of WPF, contains all the DLLs, all the packages you're using. Everything's right there. It's a zero touch install. You don't need to go running systemwide installers like you would have to do if you're using .NET Framework. If you want to target .NET Framework 4.7.2, the first thing you got to do is get that onto the machine, which you can't do as part of a normal install process. That has to be a prerequisite.

So, that was a new feature. Again, it didn't affect Rx at the time. But it went on to have ramifications because it meant that some of the context that went into the decision for the great unification in Rx 4 had changed. So these things weren't there when they decided to do the great unification. There was no .NET Core version of WPF and Windows Forms. There was no such thing as self-contained deployment. And had those two things existed, they might not have made the decisions that they made back in 2017 to unify everything into one DLL, for reasons I will shortly describe.

Rx 5.0: the plug-in bug returns

Then Rx 5.0 shipped. That was when we regressed on the original plug-in bug. This is the point where it became apparent that the great unification was not in fact in any way a fix for the original plug-in problem. You needed that versioning hack. That's the only thing we've ever done that actually fixed it properly. And I can show that. I've got a repro that demonstrates this exact bug occurring with Rx 5.0.

The other big problem was they cemented the decision that was implied by what happened with Rx 4 and then .NET Core 3.0, which is this. If you are building a .NET Core based WPF application, the great unification means you just need the System.Reactive package and you will get all of the WPF functionality built in. So that kind of follows from what happened with Rx 4. Rx 4 didn't support WPF on .NET Core because WPF on .NET Core was not a thing back in 2017. Hadn't been invented yet, but they did support WPF on .NET Framework.

And so when .NET Core provided WPF, they decided to do the same thing. They said, okay, if you're targeting .NET Core with WPF, again you don't need any additional references, just a single System.Reactive reference is the thing. And as we're going to see, that was a mistake, and actually Bart De Smet has said I really wish I'd noticed them doing that because I would have told them not to. He says that was a mistake and it shouldn't have happened, but he put his hand up and said I was busy, I wasn't paying attention, I let them do it, that's my mistake and I wish I hadn't.

So this has gone on, as you'll see that caused huge issues, and then the release that we did after endjin took over in 2023 does not attempt to fix this. That's the history of problems up to date.

Self-contained bloat on Windows

Now, just to explain why those last few things are a problem, the big issue we have now because of all those decisions is if you build a self-contained application that targets Windows and that uses Rx, you've got a problem if you didn't actually need to use both WPF and Windows Forms. So, here's what happens. If you look again at... if I bring the Rx package into view. So if we go look at not the Reactive Linq but we look at the main Rx package and we go look at version six which is the current version and we say which frameworks do you target.

You can see that we have a few. The dark blue ones say here are things there's a specific version for, the light blue things say they will run on this. There isn't a specific version targeting .NET 461, but it will run on .NET 461. Actually, that's because there's a .NET Standard version. So, the .NET Standard version will run on any of those versions of .NET Framework. And if you're running on .NET Framework 472 or later, you're going to get the version built specifically for .NET 472.

Similarly, we have .NET Core/.NET support. If you're targeting .NET 6 or later, you'll get the .NET 6 version. If anything earlier than that, you will get the .NET Standard 2.0 version. However, notice this. There's a separate version for the net6.0-windows10.0.19041 target framework moniker. So, these are a thing you can go your whole .NET life and never see. These are OS specific target framework monikers.

This says that the target is not just running .NET 6. It's running it on Windows and specifically it's running it on a version of Windows that is equal to or later than Windows 10 with the internal version number of 19041. I forget exactly what that corresponds to. They were still giving them strange names like Makers update and fall update at this point. It's one of those. It happens to be specifically, I think, the one where UWP got .NET Standard support, I think is the significance of that, but anyway it's a specific version of Windows.

And if you are building an application that specifies a Windows specific TFM you get this copy of Rx and not this copy of Rx, and the significance is the Windows specific one has the WPF bits and the Windows Forms bits, whereas the non-Windows specific one doesn't have those because those aren't available on Linux. There is no such thing as WPF on Linux. There's no such thing as Windows Forms on Linux or on macOS. And so for non Windows .NET 6 targets, that's the copy of Rx that you get to use, doesn't have any of the UI framework stuff built into it.

Why Windows-specific TFMs cause bloat

So in theory, this made sense. If you were targeting a not Windows target, then you didn't get the Windows features. If you are targeting a Windows version, then you get the WPF and Windows Forms features, which seems like a nice idea, unless you're targeting Windows, but you're not actually using WPF and Windows Forms. For example, maybe you're using Avalon UI. So, Avalon UI is a UI framework that's not from Microsoft. There's WPF, but it does a bunch of things you can't do with WPF. And when you build a Windows app using Avalon, sorry, Avalonia, I should be saying, not Avalon. Avalonia, I've typed that wrong.

Avalon was the code name for WPF. Avalonia is this framework that lets you build UI applications on several platforms, including Windows. And if you build an Avalonia app that targets Windows, it will have a TFM that is net6.0-windows10 blah or later. Today, it'll probably be net8.0 or 9.0 -windows10.0.22000 and something. It'll be a higher number, but the point is you'll get this version of Rx. If you take a dependency on Rx, you'll get all of the WPF and Windows Forms support even though you're not using it.

This is the big problem with the grand unification, is that it conflated the idea of I am targeting Windows with I need WPF and Windows Forms support. Just cuz you're targeting Windows doesn't necessarily mean you're going to be using both WPF and Windows Forms. And yet that's the decision that Rx effectively makes on your behalf. And it used not to be a problem because having that code in there, all it really did was make the Rx DLL maybe a couple hundred kilobytes bigger, if that, probably not even that much.

But now with self-contained deployments, what it means is this. If I build an application that targets a Windows specific TFM and I'm not using WPF and I'm not using Windows Forms, but I am using Rx, self-contained deployment will include a complete copy of WPF and a complete copy of Windows Forms in my build output because Rx says it needs them. By depending on Rx and picking up the Windows specific version of Rx, it says I'm using WPF and Windows Forms. And so the build tools go, oh, so your app's using it. So I better copy all of WPF and all of Windows Forms into your build output, which makes your application at least 30 megabytes bigger.

And that is why Avalonia stopped using Rx, is because if you use Rx, your installer just balloons for no really good reason. So that is a problem that we inherited, that's existed since Rx 5.0, and we don't yet have a solution to it. So this is one of the big things we are looking to fix but it's difficult.

Difficulties fixing packaging problems

So we've had lots of suggestions saying you should just do this and basically pretty much any suggestion has got problems. The problems are hard to explain and they're often very subtle and you end up writing a wall of text saying, "Okay, here are the situations you've not considered with that solution. If someone does this and this and someone else does that and then this third app does this, it's going to go wrong in this particular way." And people tend to respond to that in one of three ways. Either they don't bother reading it because it's a wall of text and they feel that you've responded to them in a hostile fashion, perhaps reasonably, and they walk away, or they do read it and go, "Oh, that sucks," and agree that it doesn't work. And neither of those is really particularly positive outcomes.

Why a "clean break" doesn't work

The recurring one here, the permanent suggestion that we get again and again, is just do a clean break. Build a brand new library that's not called the same thing as Rx was and just start from scratch and say there's old Rx and there's new Rx and they are not in any way connected. That's possibly the most popular suggestion people make because they think this will magically fix things and it doesn't. Here's why. You as an author of a project might end up with dependencies on both versions of Rx. You might be using the new Rx directly and then you add a reference to a library that's using the old Rx. Now you are using both the new and the old Rx.

And here's why that's a disaster. Every time you try and use Rx, you'll get compiler errors. And it happens because the extension methods that Rx defines become ambiguous. If you've got two different things, both of which think they're Rx, both of them will define extension methods for the IObservable<T> type in the System.Reactive.Linq namespace. So if you do a using System.Reactive.Linq and then say, I'd like to execute a select statement on an observable source, the compiler is going to go, oh, you've got two of those. You've got the old one or the new one, and I can't tell which one you meant.

And so you can no longer use Rx. As soon as you've got one thing using the old version and another thing using the new version in the same project, you are completely hosed. So we actually can't do this. We can't do a clean break without ruining it for everyone. So we have to have the next version of Rx replace the existing one. The build tools have to understand that Rx 7 is the next version of the thing that was previously Rx 6.

So that if component A says I want Rx 6 and component B says I want Rx 7, the build tools don't say, oh, you can have both. The build tools will say, okay, Rx 7 has to win then, because you can't have both at once, and then you don't get this ambiguity. But that then means you can't do a clean break. Any new version of Rx that we do has to be a successor to the thing that's already out there. So the clean break solution just doesn't work.

The Rx packaging "gauntlet"

But that's just one of many issues and so I've spent an awful lot of time writing replies to helpful suggestions. People have given up their time to try and suggest ways to fix these problems and then I've had to basically be negative back at them, which is not very nice for anyone. I've had to spend a lot of time saying, "This is why that doesn't work." And I think what would be better would be some sort of objective mechanism where I can just point them and say, "Look, we tried this. Here is your suggestion and here is an automated test that it fails. Sorry, we thought of that and it doesn't work." Or I can try it and go, "Hey, that does actually seem to work. Maybe we'll do what you... sort of. Maybe someone will eventually suggest the thing that saves us all."

In any case, whatever we eventually develop does need to solve all these problems. And the problem we've got is that we don't currently have an automated mechanism for discovering which problems exist. So when I said the Rx 5 had this regression in it. So back in whenever that was, 2019, Rx 5.0 shipped and it actually reintroduced the whole bug that we were trying to fix in the first place. This plug-in conflict bug, no one noticed. No one noticed for ages that problem had been reintroduced.

For whatever reason, the scenarios that caused people to run into it, people didn't actually see it for quite a long time. Maybe they weren't writing as many Visual Studio plugins. I'm not quite sure why. But the problem definitely exists and I have a way of reproducing it. But the issue is our existing automated tests have got no way of discovering this sort of thing. So Rx has great unit test suites. We've got about 6,000 tests and they do a brilliant job of testing all the operators behave the way they're supposed to behave.

And this is all... I'm calling them brilliant because I didn't write them. This is not me showing off. We inherited a great set of unit tests but they are not capable of detecting these kinds of packaging issues because they make the assumption that you're building some code and running it once, and setting up the .NET plug-in problem you've got to have a different structure. I have been building up a different kind of test suite which is designed specifically to reproduce the various problems that we know have happened in the past with Rx's packaging.

It's important to demonstrate that we can observe the problem with older versions because that way we know that the test works. We need to make sure that the test is capable of seeing the problem when the problem exists. So this test suite goes all the way back to Rx 3.0 and verifies that it can see things going wrong in the expected way. So 3 is meant to fail in this way because we know it does. 3.1 is meant not to fail in this way because we know it didn't. 4.0 also. 5.0 we know it does fail. 6.0 it does fail. So we run this test and then check that the failures are the expected failures, and then we can run this same test suite against the proposed new solutions to these problems.

And the idea is that by having an automated gauntlet that any proposed solution has to run, we can find out whether an idea is as clever as we hope it is. This would have found regressions like the one that happened in 5.0. And significantly, it's objective evidence. Rather than writing an 18 paragraph explanation of a really subtle point, we can just say, "Look, here's our test suite and it fails here and that's why this is unacceptable. I will answer questions about why we have that test if you're interested." That fundamentally is the issue, that is a lot easier.

I think it takes the effort out of explaining it. It means people don't have to parse the whole thing if they don't want to. They can just go, "Oh, there's a failing test." And then they can start to look into that and then maybe go, "Oh, I see why this is a hard problem and why my solution is not quite going to work." And so on. So that's the thing I'm working on. It is a work in progress. I'm aware I've been going 40 minutes already. So I'm not going to show that because it's also in a kind of messy state right now. It's very hard to understand its output. We are also working on some tooling that will make the outputs of that kind of stand out so you'll see the failures more clearly rather than having to pore through loads of console output that's coming.

I wouldn't be starting from here

So what are we going to do? The big problem really is that we don't have a time machine. We can't go back in time and undo the great unification decision, because we know exactly what we want the world to look like. What we want is almost exactly the same as what was done back in 2017. We do want most of the grand unification. The only thing we wish hadn't happened was that the UI framework bits were part of that.

What should have happened is everything except the UI framework stuff should have had the grand unification applied and then there should have been a WPF package. There should have been a Windows Forms package. There should have been a UWP package and so on. So that's the ideal state. If that's what we had, then I wouldn't be having this discussion because none of these problems would have arisen. We would still have the plug-in bug, but there might be other things we could do about that.

And actually, I think the plug-in bug might well go in Rx 7 anyway because I think we might get another of these happy confluences where all the version numbers happen to line up in a way that you don't see the problem, just as was the case with Rx version 4. Anyway, we would like ideally to have a single System.Reactive that had no UI framework stuff. It would offer .NET Standard. So that would enable .NET Framework to run. It would also enable UWP to run. So we might not even need .NET Framework or UWP targets in there at all.

Conceivably, we might not even need a .NET target. We might just have .NET Standard 2.0 and nothing else. I'm not sure about that because there might be things we can do by coding directly against .NET that make it work better. I'm not sure, but it would definitely be .NET Standard 2.0. It might be .NET 8.0 as well and that would basically be it, the System.Reactive, and then you'd have another bunch of UI frameworks. That would be the ideal.

But unfortunately, we can't do that because we need to be backwards compatible. We need to make sure that anyone who's built against Rx 6 and who finds themselves using Rx 7, that their code continues to work. And so if they were using WPF features, those were in Rx version 6's System.Reactive. They're going to have to be available in Rx 7 System.Reactive as well.

What are we doing about packaging?

So what on earth do we do about this? There are two possible options. One of which is to try and work around this. So, we have found a way to disable the thing that causes the package bloat and that might be good enough, although more on that in a second. And then we would plan to deprecate all the user interface bits that are in System.Reactive, build new libraries with new versions of those in, and we have basically a 10-year plan to deprecate those out of System.Reactive. So by 2035, we might finally get to the state that we could have been in from 2017 if things hadn't gone slightly wrong. So that's one option.

The other is to say that ain't going to work. We just need some new packages. We need to split the packages up. We need to have something that you would call either System.Reactive.Core or Rx-Main, but we can't call it those because there are old packages with those names and we can't use them. So it'll be something else. We might go with something like System.Rx, and we could deprecate System.Reactive and say this is just a legacy facade, contains no code, it just goes and points to a bunch of other things, maybe some type forwarding, so you can use that if you want but it becomes the backwards compatibility shim.

And if you want to use Rx going forward you'd use the new System.Rx or whatever we call it package that doesn't have any UI stuff in it. The shim would then point to other external DLLs for its UI behavior and so on. So that is the other option.

Option 1: workaround

So workaround, we had high hopes for this. This was officially the plan. I think publicly it still officially is the plan. However, some people have reported that it isn't working for them. So we might not be able to do this. Basically, the idea is you just set some flags. If you're writing a project that has this issue, if you're writing an Avalonia project and you want to use Rx and you don't want 30 megabytes of unnecessary junk in your output folder, then there's a flag you can set that says, "Please don't do that," and then you don't get that.

And that seems great because it means you don't need to change anything. I'm actually extremely reluctant to change anything about the structure of the packages because every time someone has done that, they have been the subject of a talk like this saying, "Oh, that idiot Ian Griffiths made a bad decision in 2025, which means that we now have to split Rx up differently for the 19th time because he didn't think of this and this." It's easy with hindsight to see the problems, but at the time it was not at all obvious that the great unification was going to cause the problems that it causes today.

It was hard to foresee that, just as it was not easy to foresee the problems that led them to decide to do that in the first place. You only really get to find out what was wrong with the design when people try and use it. And so if at all possible, I would prefer not to have another shift in where everything lives in Rx. However, if it doesn't work, then that's no good. And people are reporting that it doesn't work and I haven't yet got to the bottom of whether we can help them with other workarounds or whether there is actually a fundamental problem.

Option 2: split packages

And if that turns out to be the case, then we're basically with the Ripley option. Nuke it from orbit, it's the only way to be sure. In this case, we have to have new packages. So, we'd have a bunch of UI specific packages. We'd have a new main Rx, the third or fourth one that Rx has had in its history. The existing System.Reactive then becomes a legacy facade that you don't use unless your back compat requires you to, and basically restructure it how we want it to look, but keep that facade so that we don't have the problem as I described where you've got two different versions of Rx loaded.

This has proven a very unpopular suggestion amongst former Rx developers. They don't like it. They say it was horrible when we had all these confusing splits. People didn't understand Rx and it was a barrier to entry. And they are right to say this. There were good reasons to want to simplify it. The great unification did solve some significant problems.

And so there are good arguments not to make it more confusing. There are good arguments not to have yet another name for Rx because it means you have to understand the archaeology of this project to understand why this thing that was called Rx-Main here was called System.Reactive there, was called System.Reactive.Core here. Knowing all this stuff is just... it's not reasonable to expect people to know this, so I totally get why they don't want to do it.

But if option one doesn't work I think we have no choice. So we don't know which of these two we're going to go down yet, and we have to decide before we can release Rx 7, so this is one of the big things blocking forward progress. So that's the packaging stuff.

UWP (aka uap10.0)

Now some of the other fun issues that are also making life entertaining. UWP support. Rx supports UWP. UWP is yet another user interface framework, also known as UAP for reasons. And this is a slightly ill-fated user interface framework whose concept was it would let you target multiple different platforms with a single application. So you could target Windows 10, Windows Phone and Microsoft Band. Some of you may remember Windows Phone. That was Microsoft's failed attempt to become a major player in the smartphone market. That's no longer a thing. So no one's building apps to target that.

Microsoft Band, I'm guessing probably a lot of people don't even know what that is. It was a smartwatch back before smart watches were called smartwatches. I had one. I liked it right up until it burnt my skin because it turned out to have some metals in it my skin does not get on with. Anyway, it was an early wearable. It had things like heart monitoring and blood oxygen levels monitoring, all the kinds of stuff people like today. And you could also customize some stuff. If I remember correctly, UWP did some of that.

And there were some other things as well. There are a few different things UWP could in principle target, all of which are defunct with the exception of Windows. So nowadays, it's an overly complicated way of writing applications that target Windows, and Microsoft strongly discourages you from using it because they want you to move on either onto WinUI, which is the newer native framework, or if you insist on using a .NET based Windows library, they belatedly realized that people liked WPF way more than anyone ever liked UWP and so they resurrected WPF having tried to kill it off, and so they're saying, okay, we'll just use that then.

UWP you're not supposed to use, except there's still today some Windows features that are only available in UWP. So, you can't quite ignore it. It's not actually deprecated. It's discouraged, but not technically deprecated because it's currently the only way of doing certain things with the Windows camera, it turns out. And although you can load the relevant components through other means, you're still basically using UWP at some level. And so, we can't ignore it.

We've always supported UWP in Rx and we can't really stop doing that because it's not deprecated, and then that would just break apps. If we took it out in Rx 7 and someone was using it and got upgraded, then stuff would just break. It would stop working for no good reason. It's weird because it has its own version of .NET, but is unlike all other versions of .NET. And confusingly, it's called netcore45. It's not .NET Core. It was the predecessor of .NET Core.

And UWP is the reason the target framework monikers for .NET Core weren't netcore, they're all netcoreapp, and that was because UWP had stolen the netcore45 moniker. And so that's in there, and then it changed it anyway to be UAP, so that's a little bit weird. But it's its own version of .NET that's unlike any other, and so that is one reason we build a specialized version of Rx for it, although eventually they added .NET Standard support in UWP's special weird .NET runtime. So nowadays, if you want to support UWP with a library, you can just do .NET Standard 2.0.

That was not true for several versions of Windows 10. That only became true after a few years, which is one of the reasons Rx traditionally always offered a UWP target. And grand unification putting all the UI framework specific stuff into the one big DLL means that UWP's version of Rx now has some UI framework stuff in there as well. So, we've got the same problem with that. But this has an additional challenge.

UWP and the build system

The big problem with UWP is that it was never properly supported by the modern .NET build system. It was introduced before modern SDK projects came in. So, it uses the old Visual Studio project system and not the new project files that we know and love. Which a, means it's a bit horrible, but b, means that it doesn't really interact properly with any of the command line build tooling. We have to jump through a bunch of hoops to actually get it to build at all.

Originally, Claire Novotny, when she was one of the main developers on Rx, actually built a whole completely separate library to enable this called MSBuild.Extras. That is no longer maintained and so we've actually taken that back out of Rx again because we can't rely on it. Basically, it doesn't really work anymore. But that then means we now have to manage all of the difficulties around UWP ourselves. I would dearly love to get rid of it.

What I'd like to do with UWP

Ideally, I would take it out completely from the main Rx solution. Have a separate solution that just builds UWP specific bits. I would have UWP apps use Rx via .NET Standard 2.0, but we can't quite do it because of the grand unification. There's a scheduler type that lives in the main System.Reactive component. So the long-term goal is we're just going to deprecate that and say stop using this. Give them a new one in a separate library. Say that's the one you should be using for now because this will eventually vanish from System.Reactive, and in 10 years time we'll be able to get rid of UWP from our build system.

It is possible that the recently introduced UWP build support might make this less of an issue, but I'm not totally hopeful because it's all targeted at .NET 9 only. So, I'm not really sure whether that's actually going to work, but we'll see. I'm going to give it a try. Haven't done that. Haven't had time to yet.

WASM problems

All right. Another issue that's causing us some grief is WASM, WebAssembly. So, it's not that we don't support it at all. So you can use Rx in a WASM environment. So if you create yourself a brand new Blazor WASM application in Visual Studio and you add a reference to Rx, it will work. More than that, we've done some work to make it better than it was. So we explicitly added trimming support to make that scenario better, because with Rx 6, you ended up downloading the entire 1 megabyte DLL as part of your web page.

With Rx... so that was Rx 5 was like that. With Rx 6 we added trimming annotations so that if you just use a bit of Rx it will give you a trimmed copy of Rx, and that might be as small as 30 kilobytes, which is a lot better. So we do support it. However, there's a problem. We can't run any of our test suite against it because the test tools don't really support WASM. The tooling for WASM support in .NET isn't really all there.

I would... the reason it works at all, the reason you can even run Rx in WASM environments at all, is because in theory .NET 5 and later introduced this one .NET notion, the idea that there was a single .NET runtime. Let's all just pretend that .NET Framework doesn't exist. Let's all just pretend UWP doesn't exist. There's just one .NET runtime. It's called .NET and everything uses that. And if you have a library that supports .NET 5, you can use that library in any .NET runtime environment, including the WASM ones.

Problem with this is they're really not the same thing. So although you can use Rx in Blazor, if you try and do certain things, they don't work, mainly because of threading. The availability of threading services in a Blazor WASM world is very different from the threading services you have available to you in regular .NET because of restrictions on what you're allowed to do with threads in the browser. And there's also other WASM environments. Well, if you're interested in serverside WASM, there are lots of reasons that's a potentially interesting technology.

Currently, the tooling doesn't give us a good way of ensuring that we support those scenarios. We basically currently can't run our test suite at all in those worlds. So, we have no idea whether things work or not until people tell us that they don't. So, that's not great. I know there have been recent developments in the MSTest suite that might help us here and I intend to look at those as soon as I possibly can, but I haven't had time to do that yet. So that's another thing that I'd like to at least understand what the state of play there is before we release Rx.NET version 7.

AsyncRx.NET status

Okay, getting there. AsyncRx.NET. This was in the codebase forever, but there hadn't ever been a new package released for it. So in 2023 when we took over the maintenance of Rx, we did an alpha release of AsyncRx.NET. We've done one more subsequently after some people found some issues. So it's been in alpha since its first release and the main reason we haven't gone beyond that is we don't have a test suite for it.

The code that was in there implemented most of what regular Rx does, but for IAsyncObservable rather than IObservable. Sorry, just in case you're not familiar with this, it let you use async and await inside your Rx observers and observables and code that receives events, notifications and so on. And it had no test suite. That's a problem because we can't really be confident that bugs have been fixed and that there haven't been regressions without one.

We have in progress, and have had for some time in progress, an experiment to generate a complete async test suite from the existing Rx test suite. And right now we're roughly a third of the way through that. And it seems to be quite effective. It's found several bugs. It's found several ways in which AsyncRx.NET is not the same as regular Rx.NET, which tells me we need to finish that job before we can say AsyncRx is even ready as a beta, because there's things that don't work. So that is a work in progress and it looks like it's a viable solution but it is quite time consuming. So yeah, that's coming when we can do it but it'll be a while.

Separation of System.Linq.Async

Another thing, System.Linq.Async. So this is a thing that really shouldn't be in Rx at all. IAsyncObservable is... sorry, IAsyncEnumerable is an interface that's been in .NET since 3.0. I think .NET Core 3.0 or possibly 5, one or the other, a long time, half a decade or more. And yet there's no LINQ support for it in the .NET runtime libraries. There is LINQ support for it weirdly in the Rx repo. Why on earth is that? This is a historical accident.

Async enumerable didn't used to be in .NET. It was actually in the Rx repo first. Rx has always had a sister project called Ix, System.Interactive. The Interactive Extensions, as opposed to Reactive, for .NET. Ix is the evil twin of Rx. It's the Bizarro World Rx. Basically the idea was Rx added lots of interesting LINQ features above and beyond the features that you got in normal LINQ to Objects. It made those available for IObservable and a lot of those are actually quite useful.

And so the Interactive project said let's just backfill them. Let's make all the interesting non-standard operators that Rx defined for its LINQ and make them available for enumerable as well. And that was the Interactive Extensions. And then as an experiment they thought maybe we could do an async enumerable, and invented that interface and implemented a complete version of LINQ for that. And then several years later the .NET team said, oh, that looks good. Let's have your IAsyncEnumerable<T>. That moved out of the Rx repo and into the runtime library.

But they did not implement LINQ at the same time. They just took the interface, they provided C# language support for working with it, they did not provide any of the LINQ operators for it. And so by accident the Rx repo became the home of the thing that gives you LINQ over async enumerable. And the problem with that is we're not the .NET team, and so the expectations people have for how well LINQ works over collection things is driven by how good LINQ to Objects is, and we don't have an army of developers to make the async version as good as that.

And so a couple of years ago, David Fowler said, "Maybe we should just own this in the .NET repo." He felt that it was the right home for it. And that's actually happening in .NET 10. All the standard LINQ methods that you know and love are being implemented for IAsyncEnumerable in .NET 10, which is great. That means that we don't have to maintain it anymore. But we do have to work out how on earth we're going to deprecate our implementation, because existing code may well be using our library and that's going to cause problems for people who then move on to .NET 10.

We're going to cause the exact same problem I described earlier with the clean break with Rx, where we've got two different libraries, both of which think they're defining the select implementation for IAsyncEnumerable, and that is a problem and we need to work out how we're going to fix that, because I don't know how to do that right now. So that's another thing we'd like to fix real soon.

TFM misperceptions

I can't spell misperceptions apparently. So a couple of last things. People want a .NET 8 and a .NET 9 version of Rx. This always frustrates me slightly because we support .NET 8 and we have done since more or less immediately after .NET 8 shipped, because our test suite runs on .NET 8. We fully support Rx running on .NET 8. But people look at the library and see... bring it back on screen. They look at it and go, "No, you don't. Look, I can see the highest version of .NET you support is 6.0. So you obviously don't support .NET 8."

I would go, "Yeah, we do. Look, there it is." NuGet thinks we support it. It may be light blue rather than dark blue, but that's just because our TFM is net6. And the thing that gets lost is although .NET 6 is out of support, that doesn't mean that libraries that target it are out of support. It is absolutely valid to provide a library that targets .NET 6 or 5.0 or 3.1 or 1.0 even, and it is absolutely supported to run that on .NET 9 and it will be supported to run it on .NET 10 when that ships.

There is nothing about having an old TFM that means you're inherently unsupported if you are a library. Libraries are meant to run on newer versions of .NET, and .NET 9 explicitly supports libraries that target .NET 6.0, and we test that, and so there should be no argument. However, lots of people don't understand that, and to be fair it requires a relatively subtle understanding of what TFMs really mean, and not all developers have that. And it's easier to understand if you look at a component and see that it has a .NET 8 target, then you're confident that it definitely supports .NET 8.

Why we will update the TFM anyway

So in practice there's a PR reason for doing this, but we will add a net8.0 TFM with Rx version 7. But actually the main reason we're doing that is not because it adds any new functionality. It's because it enables us to take functionality away. It means we don't have to support .NET 6 with Rx, and that's the only reason we'll be removing it. But it will also, as it happens, solve this perception issue of it looks out of date. Our policy is when versions of .NET go out of support, we will sometime soonish after that release a new version that does not have that TFM in it, so that we can be clear that Rx is supported on current versions of .NET but we don't want you using old versions. That's the basic idea.

Backlog: what about actual meaningful progress?

Nearly there. Oh, that's just a slide saying what I just said. Finally, what about actual feature work? Because all of that is just stuff we have to do to keep the project alive, without adding any new functionality, without fixing any bugs. So, there are bugs. We have fixed a handful of these over the last couple of years. We've actually not done a new release for a bit though, so those are all currently only in preview builds. We're aware of this. It's just that getting a new Rx release out the door is pressing, and so this has fallen behind in priority because we really need to fix the bigger problems as soon as we can.

But we are working now on fixing bugs. We do look at PRs and some have been merged and we consider feature requests. We're also contemplating whether we can do anything around reducing the amount of allocation that Rx does, because it was built in a land before Span and all those sorts of things, and we're interested in whether we can do anything to improve that. We are aware there is also a separate library that is specifically targeted for that and maybe that's the best answer, but we want to know internally, can we do anything that takes advantage of that to at least improve performance. That's an active area of investigation right now.

Conclusion

So, I didn't finish putting bullet points onto my conclusion slide, I just noticed. So, we have the packaging problems, the big ones. This is kind of the long pole thing. We really need to work out what it is we're actually doing there. And it's still unclear which of the two options really is the best one. We got to pick a solution before we release Rx 7.0. We also have to deal with the testing to make sure that that's a robust decision.

We do need to understand what's going to happen going forward with UWP and WASM. And I think that is everything. So, thank you, if you have, for listening to the end. That is where we're at today with Rx. And I hope that clarifies why the outwardly visible progress has not been as fast as we would have liked. There's a lot of things that we need to fix before we can actually move forward again.

About the presenter

Ian Griffiths

Technical Fellow I

Ian Griffiths

Ian has worked across an extraordinary breadth of computing - from embedded real-time systems and broadcast television to medical imaging and cloud-scale architectures. As Technical Fellow at endjin, he brings this deep cross-domain experience to bear on the hardest technical problems.

A 17-time Microsoft MVP in Developer Technologies, Ian is the author of O'Reilly's Programming C# 12.0 and one of the foremost authorities on the C# language and high-performance .NET development. He's a maintainer of Reactive Extensions for .NET, Reaqtor, and endjin's 50+ open source projects.

Ian has created Pluralsight courses on WPF fundamentals, WPF advanced topics, WPF v4, and the TPL, and has given over 20 talks at conferences worldwide. Technology brings him joy.