Why doesn't VS.NET navigation to var definition?

  • Thread starter Thread starter brett
  • Start date Start date
B

brett

Sometimes when I right click on a variable and select go to definition,
I get a message that VS.NET 2003 cannot navigate to variable. For
example, if you paste the following code into an empty class file and
right click on, strcomposedmessageid, you'll get the error:

private void doRequests(FileInfo[] fileInfo)
{
string strcomposedmessageid="";
try
{
if(stopProcess)
{
return;
}

int totalMessages=fileInfo.Length;

int loops= totalMessages/maxMessages;
int remainder=totalMessages - maxMessages*loops;
int j=0;

if(remainder>0)
{loops++;}

if(totalMessages>0)
{
for (j=0;j<loops;j++)
{
strcomposedmessageid="";

Note: the code itself will not run as I have scaled it down
significantly for this post.

Thanks,
Brett
 
I get this too sometimes... the information is cached and sometimes it
appears to "forget". I'm not sure about 2003, but i think VC++ 6 held this
information in a file ending in ".ncb" with the intellisense stuff. I used
to close the application, delete this file, then load up the application
again so that VS would regenerate it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top