Reputation: 4259
I have been given some criteria for a project. It MUST be constructed in a particular way. I know this isn't a great question but my C# is really rusty. The specification states:
Application namespaces should follow (but not be limited to) the below [actual names changed]:
AnExample.Sample.Foo
AnExample.Sample.Foo.UnitTests
AnExample.Sample.Bar
AnExample.Sample.Bar.UnitTests
and that "each namespace should exist within its own assembly"
.
I'm a little confused- what is being asked for and how to achieve it? For each namespace to exist in it's "own assembly" does it have to be a separate project and referenced or is it a folder structure?
Upvotes: 0
Views: 258
Reputation: 22794
Basically, what they're asking you for is that each namespace is in its own separate file.
A project compiles to an assembly, which can be a .dll or an .exe. What they're saying is that each separate namespace should be in a separate project, so it compiles to a separate file. This is good for decoupling. You can then bring them all together using the Add Reference... button in VS.
Upvotes: 1
Reputation: 2853
each namespace would have to be in its own project (.csproj)
within your projects, you could have whatever folder structure you wanted, as along as the namespace in the entire project is the same.
Upvotes: 11