Source generator must always prepend all usings and namespace references with global::
#8170
Labels
area/code-generation
Categorizes an issue or PR as relevant to code generation
difficulty/medium 🤔
Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUI
kind/bug
Something isn't working
Current behavior
The source generator does not always prepend all usings and namespace references with `global::``
Expected behavior
The source generator does always prepend all usings and namespace references with `global::``
How to reproduce it (as minimally and precisely as possible)
Create any class in the namespace
<SolutionName>.Windows
.After that, you won't be able to build the app because of the namespace issue in the code generated from App.xaml
Workaround
Do not use namespaces that contain
Windows
in their segmentWorks on UWP/WinUI
Yes
Environment
Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia
NuGet package version(s)
4.2.0-dev.100
Affected platforms
iOS, Android, WebAssembly, macOS, Skia (WPF), Skia (GTK on Linux/macOS/Windows), Skia (Tizen)
IDE
Visual Studio 2022
IDE version
17.1 preview
Relevant plugins
No response
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: