Help ... Name '_xyx' is not declared

  • Thread starter Thread starter Nick Hoggard
  • Start date Start date
N

Nick Hoggard

Hi All,

We are having real trouble with this at the moment, and trusty Google hasn't
provided any real answers. In fact the best answer we found was to 'stand
on my hand, run around desk 5 times, throw salt over left sholder and hold
breath'. There is now a lot of salt on the floor and VS still doesn't seem
to work right.

This error has only been happening for the last couple of days. When we
start VS there are no errors in the build list. When we do a rebuild all we
start to get the above error (Name '_varname' is not declared), which will
not go away until we restart VS. The actual variable name of what is
missing varies, but the variable is always declared (in some cases the under
score is added to the start of name for some reason). The variable is
always declared within the same file, so it isn't a reference issue.

Can anyone offer any ideas to help with this problem? Our development is
basically at a stand-still until we can get VS working consistantly again.

Thanks

Nick Hoggard
 
What language is the code in? The file extension matches that language,
right?

Paul T.
 
Hi Paul,

The code is in VB.Net for the compact framework. Yes, all the files have
..vb as the extention and have been added via the IDE. One further comment I
have to add is that the solution has multiple assembiles within it if that
is any help.

Also the variable that it says is not declared is not always in the same
file.

Nick

----- Original Message -----
From: "Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT
com>
Newsgroups: microsoft.public.dotnet.framework.compactframework
Sent: Friday, December 17, 2004 11:06 AM
Subject: Re: Help ... Name '_xyx' is not declared
 
Update ...

I have just writen a script that deletes all the bin files for each project
in the assembly and the build works fine for one build. after that the
problem returns.
 
We get this all the time - if you Rebuild (not just Build, or Run) your
solution, the problem will go away, then you can Run it fine.

Let's hope they fix this in VS2005.
 
Hi Jon,

Actually so far I have found the opposite to be the case. If I rebuild then
it basically always fails. If I just do a build then I seem to be able to
build the application a few times between having to restart the IDE.
Let's hope they fix this in VS2005.

We can only hope :) Has anyone seen this problem in the beta at all?

Cheers

Nick
 
Hi All,

In case anyone else hits this problem, here is the workaround that is
working for us at the moment (I'm sure it will all fall over soon
enough)

When the problem first arrises:

1. Close IDE
2. Delete all bin / obj directories for all projects in solution
3. Restart IDE.

To prevent error from re-occurring:

1. Changed solution configuration to deploy and run only. NOT build.
2. Setup a batch build that does the actual build. Note this seems to have
to be a Build, not a Rebuild.
3. For each debug / deployment run - Delete folder on device (optional, but
seems to fix other problems), Batch Build, Run via VS.

I don't think this system is perfect, but it seems to be working.

Hope this helps someone. If anyone comes up with a better solution please
let me know. Email: nick_newsgroups at silvercode dot co dot nz

Cheers

Nick
 
Back
Top