Question

Hi all I've just started a new project using Visual Web Developer 2008 Express and all my code behinds are not in any namespace. How can I set the default namespace for the project?

In VisualStudioPro it used to be in project properties, the website properties in Visual Web Developer 2008 Express seem very ... express.

Thanks,

David.

Was it helpful?

Solution

Visual Web Developer (prior to 2008 SP1) does not support Web Application projects. Default namespace is only available in Web Application projects.

If you really want to add your classes to a namespace, you should do it manually (the namespace surround with code snippet can prove pretty useful) by enclosing them in a namespace statement:

namespace MyDefaultNamespace {
   // original code
}

OTHER TIPS

If you are using the Website Project Template, then namespaces aren't used. If this is the case, consider using the Web Application Project Template.

Do Find and Replace to find your namespace and replace it with what you want.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top