You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.Z namespace 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.
The text was updated successfully, but these errors were encountered:
kmgallahan
changed the title
Proposal: Provide a way to use different namespaces for generated RxLink* classes
Proposal: Provide a way to use different namespaces for generated Rx* classes
Feb 23, 2024
Problem
I'm building WinUI 3 projects using Visual Studio Version 17.10.0 Preview 1.0.
Currently, given these circumstances:
A.B.C
X.Y.Z
X.Y.Z
namespace declaration is made anywhere in the app projectThen 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:
This means that any time an
Rx*
class is generated with anX.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
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.
The text was updated successfully, but these errors were encountered: