I have a library - Foo.System.Management
I have an application - Foo.New.Application
In this application, Using System; is imported, and what ends up happening is this is being resolved to Foo.System and causes my project to throw error's saying
The type or namespace
Diagnosticsdoes not exist in the namespaceFoo.System
My assumption is that because of the same Base namespace Foo it is causing that resolution. Looking through the Namespace Docs I can't really find a clear explanation of this.
- What are my options in my
Foo.New.Application? - Some of those
Using System;directives are code generated so I cannot control aliasing. Should I just rename the library? - Is it bad practice to create a namespace like
Foo.Systemfor that reason?
Citing the design guidelines:
https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-namespaces
So, yes, you should find a more suitable name for your library that follows the design guidelines for names of namespaces and it is indeed bad practice to use
Systemas part of your namespace name.