-
-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Problem
I'm building WinUI 3 projects using Visual Studio Version 17.10.0 Preview 1.0.
Currently, given these circumstances:
- A WinUI 3 app exists with namespace
A.B.C - A WinUI 3 app library exists with namespace
X.Y.Z - The app project has a project reference to the library project
- A
X.Y.Znamespace declaration is made anywhere in the app project
Then all XAML references to anything found in the library will have the following error appear in Visual Studio while the files containing them are open:
XLS0414 The type 'someX.Y.Zcontrol' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.
This means that any time an Rx* class is generated with an X.Y.Z namespace in the app project a large number of errors show up in Visual Studio.
The app project will still build and run fine, the errors are just distracting and clog up the Error List window.
Proposal
Provide a mechanism to use different namespaces for generated Rx* classes than the those for which the type was declared in.
Either
- Attribute decoring any class in a project instructs the generator to use that project's namespace for all generated classes (not great as it could cause conflicts).
- Append something to the namespace declarations, such as
X.Y.Z.RxEvents. This could optionally be turned on per project by adding an Attribute to any class in a project. The errors only appear for exact namespace declaration matches.
I don't know if the appearance of the errors is intentional. I imagine getting the issue resolved on the Microsoft side would take a monumental effort, compared to tweaking this generator slightly.