oh dear... adding a namespace after...

Evening everyone,

I very stupidly developed part of my system before realising I ought to really add a namespace to all of my code (i am developing an ASP.NET c# app) in VS 2005.

Does anyone know of a quick and painless way of adding a namespace to an entire project? It contains a strongly typed dataset, i'm not even sure the procedure to add this into a namespace.

Any help/tips/advice welcome. Apprecate any help.

Yes I know im a silly boy :)

Taz

[496 byte] By [etones] at [2007-12-24]
# 1

namespaces are already added by default, the default being the name of the project. You can change the default namespace if you go to the properties of the project, in the application tab there will be a field called "Default namespace" - just change it to whatever you like however. You may need to change the namespace names shown/entered in the code behind (.cs) files also, after this.

What problems are you having with the namespace?

ahmedilyas at 2007-10-8 > top of Msdn Tech,Visual C#,Visual C# General...
# 2
When you change namespace of project that contains datasets, namespace of datasets will not be changed also. But to repair this problem all you have to do is find datasets in solution explorer and open them. Yes, just open them in design and close and it will be fixed.
boban.s at 2007-10-8 > top of Msdn Tech,Visual C#,Visual C# General...
# 3

Hi guys,

many thanks for the response. Unfortunately, when I go into the project properties, there is no application setting.

I am running VS 2005 and developing an ASP.NET application. Within the project properties there is only "Common Properties" and "Configuration Properties". I cannot set a reference to "Application" anywhere,

Any advice welcome.

Kind regards
Taz

etones at 2007-10-8 > top of Msdn Tech,Visual C#,Visual C# General...
# 4

it maybe different in ASP.NET

in the common properties in the General section, there is a field called "Defailt Namespace" - you can change it to the namespace you like from there. Otherwise the best place to ask ASP.NET related questions would be over at the ASP.NET forums:

http://forums.asp.net

ahmedilyas at 2007-10-8 > top of Msdn Tech,Visual C#,Visual C# General...