Bogus Task List Errors That Prevent Build

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am constantly getting reports in my task list like these:

* 'someObjectName" is not a member of 'someOtherObjectName'
* Handles clause requires a WithEvents variable.
* Name 'someName' is not declared

These errors are totally erroneous. If I go into the class and cut the
offending code and repaste it in the same spot the errors temporarily go
away. Also, more effective is to delete the files in project/bin and
rebuild. Both fixes work temporarily.

When these errors aren't displayed, the project builds find and runs fine,
but when the errors are being displayed, it won't build.

Please somebody post an answer. This has been a frequent hassle and I have
searched extensively for answers without luck.

Thank You,
Jon
 
June 23, 2005

I have had that problem occasionally too. It was a complete and utter
development stopper too! :-( I eventually had to save the code files and
then re-create the project from scratch. I copied and pasted the UIs and
code, but it still was a giant headache... Hope yours works out better than
mine....
 
You may have hit a build/rebuild problem that bothered me for a while. When
you try a build that should work but fails, try a rebuild. If the rebuild
fails, then I have no answer for you, and this reply is off topic. good luck.

But if the rebuild works where the build failed, then you have hit this
nasty little problem, and the workaround is to do rebuilds rather than
builds. It is an irritant, but you will get used to it, and you won't need
to edit your code to execute the workaround. In my opinion, this is an MS
bug where build doesn't quite get things right in projects of sufficient size
or complexity after some editing operations. To read more, search all
newsgroups for 'amercer rebuild'.
 
I also wanted to add to this question that I find it strange that Microsoft
has not released a lot updates to Visual Studio.NET. Am I missing something?

VS.NET 2002 had so many problems that they rushed 2003 out right away. Just
for the record, 2003 needs some fixes too.
 
Hi Jon

Do you have multiple projects in your solution, and, if so, do one or more
projects reference any of the other projects?

The problem you describe can occur when you reference other projects in your
solution by browsing to the project's output dll, rather than selecting from
the Projects tab in the Add Reference dialogue.

I used to get this problem frequently until I changed my method of
referencing other projects (on the suggestion of Microsoft tech support). I
haven't had the problem once since.

One other thing to add: check that you don't have a circular reference. The
IDE prevents direct, one-to-one circular references, but it is possible for
project A to reference B, B to reference C, and C to reference A. Apart from
being bad coupling, this can also through VS into a spin.

HTH

Charles
 

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