-
Notifications
You must be signed in to change notification settings - Fork 706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The type 'GlobalStaticResources' exists in both ...
#8750
Comments
Source code button navigates to component folder on GitHub (main branch) Most likely namespace is shown (hard-coded logic for now) - unoplatform/uno#8750 Shows and links to Uwp/WinUI packages on NuGet
Source code button navigates to component folder on GitHub (main branch) Most likely namespace is shown (hard-coded logic for now) - unoplatform/uno#8750 Shows and links to Uwp/WinUI packages on NuGet
Source code button navigates to component folder on GitHub (main branch) Most likely namespace is shown (hard-coded logic for now) - unoplatform/uno#8750 Shows and links to Uwp/WinUI packages on NuGet
@jeromelaban Can And I find it may hard to change to internal... |
How can I avoid this problem? Do not have the same root namespace for two assemblies project. Please make sure that no more than one RootNamespace in your csproj[s] is the same. |
We do not have a fix for this yet, the only way around this is to avoid having the same default namespace for assemblies. |
@jeromelaban For me, having the same default namespace is very common. And the error messages here are confusing. |
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
GlobalStaticResources
class, 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.The text was updated successfully, but these errors were encountered: