views:

367

answers:

1

I've inherited a web project that was being published by another developer. The domain is changing so I've created a new project in VS2005 and added the existing files. I've converted the project to a web application to create the designer files. However, none of the existing pages have a namespace declared. I'm also getting errors referencing classes that exist in a folder within the project (Global.asa sees the classes but no other pages do).

Is there a recommended way to add a namespace to all of the files and/or get the files to recognize the classes in the root level folder?

A: 

If you're starting from scratch, it may be easier to go completely without namespaces to start. Check the classes in the problem folder and remove namespaces there if they exist. Just to get the site building.

Once you have working code, then you can go back and add in namespaces. Converting old code to WebApps can be a pain, but if you focus exclusively on getting the code to compile before you start refactoring, you'll be in much better shape.

You've probably already seen ScottGUs posting on this topic, but if not, it does show the quickest way to wrap existing code with namespaces.

Michael La Voie