BUG?: Browser information and Namespaces

  • Thread starter Thread starter Chris Bearchell
  • Start date Start date
C

Chris Bearchell

I am trying to get browse information for a VS.net 2003 C++ project,
however I am running into trouble resolving methods within a
namespace. From within the object browser, all methods within a class
report "No references available for this item" when the class is
within a namespace. If I remove the namespace, then VS is able to
resolve the references correctly. This problem does not affect member
variables.

The following code exhibits the problem (generated from a default
console app with browse information enabled):

namespace test
{
class TestClass
{
public:
TestClass(){}

~TestClass(){}

void TestMethod(){}

public:
bool testVariable;
};
}

using namespace test;

int _tmain(int argc, _TCHAR* argv[])
{
TestClass test;

test.TestMethod();

test.testVariable = true;

return 0;
}

In this case TestMethod() reports no references available whilst
testVariable correctly identifies the line test.testVariable = true;.
Removing the namespace resolves the problem entirely.

I suspect that this is a bug in VS.net 2003. I noticed this thread:

http://groups.google.com/[email protected]&rnum=1

which suggests this is a known issue that was being worked on. It also
suggests that the issue was to be fixed in a future release (this
thread was November 2002) and I was wondering whether this should have
been addressed for VC 7.1.

Many thanks,

Chris
 
Hi Chris,

Thanks for your post. I reproduced the problem on my side with both VS .NET
2002 and 2003. I am now checking the status of this issue with our
Developer Team. Please feel free to let me know if you have any problems or
concerns.

Have a nice day!

Regards,
HuangTM
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Dear Chris,

Thank you very much for your feedback. As you know, this is a known issue
and it is being investigated. It is possible that this may be resolved in
the next version of Visual Studio .NET, but I cannot guarantee a resolution
of this issue at this time.

Please feel free to let me know if you have any problems or concerns.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! ¨C www.microsoft.com/security
This posting is provided ¡°as is¡± with no warranties and confers no rights.
 
Back
Top