Linda
Linda

Reputation: 109

How to fix visual studio 2008 when it adds subfolder names to the default namespace?

I am having a problem at work whereby my visual studio 2008 has started adding subfolder names to my default namespace when i create a web page file (.aspx.cs) under a folder. For example if my project name is ProjectX and i have a subfolder called Subfolder1, when i add a new web page 'Home.aspx.cs' the namespace becomes 'ProjectX.Subfolder1':

namespace ProjectX.Subfolder1
{
    public class Home

I am not sure if this is the default behavior but when my colleague does the same thing, she says that the namespace does not include the Subfolder1:

namespace ProjectX
{
    public class Home

The only thing i suspect is causing this behavior is the fact that i have Resharper installed on my pc and she does not.I thought Resharper was helpful but it may be changing my project file and messing up my project. Please advise how i could resolve this.

Thank you.

Upvotes: 2

Views: 139

Answers (1)

Conrad Lotz
Conrad Lotz

Reputation: 8818

You can try and make use of namespace templates

http://msdn.microsoft.com/en-us/library/eehb4faa%28VS.80%29.aspx

or select on the folder in the solution explorer then properties. Set Namespace Provider = False

Upvotes: 1

Related Questions