Can't get rid of blue squiggly

I can't get rid of the following message:

Namespace does not correspond to file location, should be 'xxx'

I've setup an NUnit project with a Class1.cs file. In that file, I've set its namespace to the same namespace I wish to test. According to Solution Explorer, it belongs to a project called X; however, I've set its namespace to A, the project I want to test.

I've tried moving the Class1.cs file to a folder called Data and setting that folder's Namespace Provider property to False, but this did not change the warning message.

Any suggestions on how this message can be suppressed?

Thanks, lars

5 comments
Comment actions Permalink

Hello lazerb,

You can set its severity to "Do not show" in Options / Code Inspection /
Inspection Severity, look at the bottom of the list.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


IR> I can't get rid of the following message:
IR>
IR> Namespace does not correspond to file location, should be 'xxx'
IR>
IR> I've setup an NUnit project with a Class1.cs file. In that file,
IR> I've set its namespace to the same namespace I wish to test.
IR> According to Solution Explorer, it belongs to a project called X;
IR> however, I've set its namespace to A, the project I want to test.
IR>
IR> I've tried moving the Class1.cs file to a folder called Data and
IR> setting that folder's Namespace Provider property to False, but this
IR> did not change the warning message.
IR>
IR> Any suggestions on how this message can be suppressed?
IR>
IR> Thanks, lars
IR>


0
Comment actions Permalink

Ilya,

Is there anyway to do this in a single file or project from a "#pragma warning disable" or "// ReSharper disable" command? Thanks!

Matthew Krzan,
(NT4 & 2k) MCP, MCSE
(NT4) MCPI, MCSEI
MCDBA (7.0, 2000), MCTS: SQL 2005
ACISS Systems, Inc.

0
Comment actions Permalink

Hello,

May be, you want to exclude some folders from participating in namespace
building process? If so, check properties view and "Namespace Provider" property.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


IR> Ilya,
IR>
IR> Is there anyway to do this in a single file or project from a
IR> "#pragma warning disable" or "// ReSharper disable" command?
IR> Thanks!
IR>
IR> Matthew Krzan,
IR> (NT4 & 2k) MCP, MCSE
IR> (NT4) MCPI, MCSEI
IR> MCDBA (7.0, 2000), MCTS: SQL 2005
IR> ACISS Systems, Inc.


0
Comment actions Permalink

Ilya,

I saw other posts on that solution, unfortnetly its not in a folder, it's just in the root of a C# project. Is there any chance of a "// ReSharper disable" command to be added in a future build, just to disable the warning? Thanks!

Matthew Krzan,
(NT4 & 2k) MCP, MCSE
(NT4) MCPI, MCSEI
MCDBA (7.0, 2000), MCTS: SQL 2005
ACISS Systems, Inc.

0
Comment actions Permalink

Hello,

Do you have correct root namespace specified in project properties?

You can disable the warning, open Options / Code Inspection / Inspection
Severity, scroll down to Code Structure Analysis and change severity to "Do
not show".

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


IR> Ilya,
IR>
IR> I saw other posts on that solution, unfortnetly its not in a
IR> folder, it's just in the root of a C# project. Is there any chance
IR> of a "// ReSharper disable" command to be added in a future build,
IR> just to disable the warning? Thanks!
IR>
IR> Matthew Krzan,
IR> (NT4 & 2k) MCP, MCSE
IR> (NT4) MCPI, MCSEI
IR> MCDBA (7.0, 2000), MCTS: SQL 2005
IR> ACISS Systems, Inc.


0

Please sign in to leave a comment.