dotnet / dotnet/wpf

XamlGeneratedNamespace::GeneratedInternalTypeHelper should be non-public or uniquely named

Open
#3,469 5 comments 8 reactions 0 assignees View on GitHub
Enhancement Requested needs more information
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/content/problem/1172109/xamlgeneratednamespacegeneratedinternaltypehelper.html)._

---
[severity:I'm unable to use this version of Visual Studio] [regression]
In our WPF projects, Visual Studio (or one of its tools) creates the class GeneratedInternalTypeHelper in the namespace XamlGeneratedNamespace. On its own, this is fine; however, if you link two such WPF projects into a third C++/CLI project, you get warnings that it cannot use one of the two classes.

On our build server, we have zero warning tolerance in an effort to promote fixing all warnings as, generally, they are useful. This is preventing us from building using the latest tools.

Also, in the IDE, it is distracting as we do want to keep an eye out for other warnings.

If the tools auto-generated this class with lessor access like _internal_ or used a unique name for each such project, I believe we would not get this warning.

Including an instance of the class as an attachment.

This is how the warning appears:
>'GeneratedInternalTypeHelper': cannot import symbol from 'DllManagedCPP.dll': as 'XamlGeneratedNamespace::GeneratedInternalTypeHelper' has already been imported from another assembly 'ManagedCSharpAssemblyA'
'GeneratedInternalTypeHelper': cannot import symbol from 'DllManagedCPP.dll': as 'XamlGeneratedNamespace::GeneratedInternalTypeHelper' has already been imported from another assembly 'ManagedCSharpAssemblyB'

---
### Original Comments

#### Feedback Bot on 9/3/2020, 11:11 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

---
### Original Solutions
(no solutions)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.