views:

123

answers:

3

I always find my self in trouble with alot of (namespace or refference errors?), when trying to rename a project in VS.

This is how I do: I click on the project and press F2 and rename it.

That procedure do you guys follow?

I use to work in Eclipse, and there I don't have the problems, maybes it's easy in VS too and it's just me.

Thx, radbyx

A: 

Renaming the assembly should not be an issue, unless you have external projects depending on it. Within the same solution, it will carry on working correctly.

leppie
I have a project called "DatabaseAccessLayer" and lets say I change it too "DatabaseAccessLayer2", alle the namespaces for alle the classes in that project doesn't change but remain "namespace DatabaseAccessLayer...".And ofcourse it's the same thing for my Entity model.
radbyx
There is no easy way to rename namespaces that I know of. Unless some VS addins do it for you. You can try, carefully, find and replace using regular expressions.
Jacques Bosch
A: 

In the properties for the project, I can set "Assembly name" and "Default namespace", I think it's what I've been look for. I assumed that the namespace was automatically renamed also in that proces.

If i'm still missing something, let me know so I can accept your answer.

radbyx
A: 

Try highlighting the root namespace in one of your files, and then hitting F2 and typing the new one in. This will perform a Refactor->Rename (also available via contextual menu), which should change that root namespace in all your files. Then, setting "Default Namespace" and renaming your project should take care of the rest.

drharris