-
Notifications
You must be signed in to change notification settings - Fork 854
The type 'GlobalStaticResources' exists in both ... #8750
Copy link
Copy link
Open
Labels
area/code-generationCategorizes an issue or PR as relevant to code generationCategorizes an issue or PR as relevant to code generationdifficulty/medium 🤔Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUICategorizes an issue for which the difficulty level is reachable with a good understanding of WinUIkind/bugSomething isn't workingSomething isn't workingno-repro
Metadata
Metadata
Assignees
Labels
area/code-generationCategorizes an issue or PR as relevant to code generationCategorizes an issue or PR as relevant to code generationdifficulty/medium 🤔Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUICategorizes an issue for which the difficulty level is reachable with a good understanding of WinUIkind/bugSomething isn't workingSomething isn't workingno-repro
Type
Fields
Give feedbackNo fields configured for Bug.
Current behavior
When building an application, the following message may arise:
Expected behavior
The compilation succeeds.
How to reproduce it (as minimally and precisely as possible)
Craete an application which contains two projects that use the same default C# namespace.
Workaround
Change the default namespace to be different for each assemblies.
Works on UWP/WinUI
Yes
Environment
No response
NuGet package version(s)
4.2.6
Affected platforms
No response
IDE
No response
IDE version
No response
Relevant plugins
No response
Anything else we need to know?
This issue is caused by the fact that the code generator uses the default namespace to create the
GlobalStaticResourcesclass, and uses it in App.xaml generation to initialize resources. These types conflict because they can be found in two assemblies, with the same qualified name.