Allow changing the name or namespace of ThisAssembly class
See original GitHub issueWe encountered the following scenario where `ThisAssembly caused a build break.
- Project A has
ThisAssemblygenerated and also[InternalsVisibleTo]for project B - Project B also has
ThisAssembly. When it tries to use it, build fails because of ambiguous ThisAssembly class.
The solution to this issue may be either naming ThisAssembly class differently, or placing it inside a namespace (root namespace of the project, perhaps). For backward compatibility, this should be opt-in.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Changing Assembly Name gives errors
You'll need to fix up all of the references to that assembly to use the new name. Depending on how you made the...
Read more >Add `private` and `namespace` accessibility modifiers for ...
I think that the BEST part of this proposal is namespace access modifier. It's a perfect way to get rid of ugly nested...
Read more >Resolved - Using classes within a namespace
I'm trying to use this class: namespace Microsoft.MixedReality.Toolkit.UI { public class SliderSync : RealtimeComponent {...
Read more >AssemblyBuilder Class (System.Reflection.Emit)
Loads the specified manifest resource, scoped by the namespace of the specified type, from this assembly.
Read more >devlooped/ThisAssembly: Exposes project and assembly ...
Exposes project and assembly level information as constants in the ThisAssembly class using source generators powered by Roslyn.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@AArnott Given the above, can we reopen this? (I’ll try to find time to do a PR for this eventually, but in the meantime, someone might come across this and feel like contributing the enhancement.)
I don’t think we’d add a boolean switch to forcibly link the namespace of
ThisAssemblytoRootNamespace. Rather, if we made the namespace flexible I’d say just take astringswitch and let it be anything (including$(RootNamespace)).