dotnet / reactive

The Reactive Extensions for .NET
http://reactivex.io
MIT License
6.73k stars 751 forks source link

Referencing System.Reactive from a WinUI 3 app or library is causing XLS errors to display in VS while XAML files are open #2077

Closed kmgallahan closed 10 months ago

kmgallahan commented 11 months ago

Bug

Referencing System.Reactive from a WinUI 3 app or library is causing XLS errors to display in Visual Studio while XAML files are open.

There seems to be a commonality that all errors are reported for controls & properties added after the first UWP release (not that WinUI 3 is uses system XAML/UWP, and all controls/properties have always existed in the WASDK/WinUI 3). Such as Grid's backgroundSizing and RowSpacing properties, or the ToggleButton control and its CornerRadius property.

Repro steps are at the bottom.

Errors:

Errors

No errors (reference commented out):

NoErrors

Which library version?

5.0.0, 6.0.0, 6.0.1

What are the platform(s), environment(s) and related component version(s)?

Microsoft.WindowsAppSDK Version 1.4.231115000 & latest preview Microsoft.Windows.SDK.BuildTools Version 10.0.22621.2428 & latest preview Microsoft Visual Studio Community 2022 (64-bit) - Preview Version 17.9.0 Preview 2.0

What is the use case or problem? What is the expected outcome? What is the actual outcome?

The XLS errors can't be silenced in any way and there can be dozens to hundreds of them clogging up the Error List view depending on what files are open.

Do you have a code snippet or project that reproduces the problem?

Repro:

  1. Clone this repo: https://github.com/kmgallahan/ReactiveWinUITests
  2. Build the solution
  3. Open AControl.xaml and/or MainWindow.xaml
  4. XLS errors will appear in the Error List view
  5. Comment out one or both references or System.Reactive
  6. Rebuild the solution and wait a moment, the errors will disappear
kmgallahan commented 10 months ago

I can no longer repro this with the Visual Studio 2022 version 17.9 Preview 4 release.