Haritha
Haritha

Reputation: 1508

Wrong namespace when creating a new C# file?

I have two projects called Hbt.DMS.BusinessLogic and Hbt.DMS.Web . In Hbt.DMS.BusinessLogic I have a folder called Operations. When I try to create a new file inside Operations folder, it generates a wrong namespace inside the file.

ex: the generated namespace: Greenwich.DMS.Web.Operations
expected namespace: Greenwich.DMS.BusinessLogic.Operations

I noticed that this happens when I try to create new files in any folder in Hbt.DMS.BusinessLogic project.

What am I missing?

Upvotes: 4

Views: 1363

Answers (1)

Igal Tabachnik
Igal Tabachnik

Reputation: 31548

Make sure you have the correct Default namespace in the Project Properties (e.g. Greenwich.DMS.BusinessLogic). The visible name of the project does not necessarily have to be the same as the default namespace.

Upvotes: 5

Related Questions