Results 1 to 9 of 9

Thread: Annoying Non-Error Errors

  1. #1

    Thread Starter
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,373

    Annoying Non-Error Errors

    This may be specific to WPF, as that's where I'm encountering this, but I'm not sure about that.

    Consider this simple constructor:

    Code:
     Public Sub New()
    
         InitializeComponent()
    
         DataContext = globalPICListManager
    
         spinSurveyYear.Value = Date.Now.Year
    
         cbStreams.SelectedIndex = -1
         cbCoordinator.SelectedIndex = -1
    
         gdSurveyGrid.DataContext = Me
         bGetCandidates.DataContext = Me
    
     End Sub
    All or part of every single line is an 'error'. InitializeComponent is an error, so it is little surprise that every object that would also be declared on the same code page as that function is also an 'error'. The thing is, the program runs just fine. It builds fine, it rebuilds fine, and it runs fine. The only consequence of the IDE not recognizing all those objects is that Intellisense doesn't work and case correction doesn't work when calling methods of objects that the IDE doesn't believe exists. They DO exist, though, and these supposed compiler errors don't prevent the program from running.

    I've seen this happen several times, and it always goes away. Exactly what steps I have to take to make it go away, I'm not sure, but this is clearly an IDE bug, as it has lost track of the associated code file with the declarations of the 'missing' items, though the compiler has not lost track of the same page.

    Any suggestions about this?
    My usual boring signature: Nothing

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,669

    Re: Annoying Non-Error Errors

    Usually whne I've seen something like that, there''s an issue in InitializeComponent... but that's also accompanied by build or run-time errors... Try doing a clean on the project? And/or deleting the obj/bin folders?

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,373

    Re: Annoying Non-Error Errors

    Tried the clean, which had no impact. I have yet to try deleting the bin/obj folders. That seems off target, to me, as this certainly acts like an IDE bug. Still, it's worth a try.
    My usual boring signature: Nothing

  4. #4
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,986

    Re: Annoying Non-Error Errors

    I've had this issue in WinForm projects too using Visual Studio Professional 2022 (64-bit). I cannot find any rhyme or reason to it and eventually it did go away, but it is very annoying.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  5. #5
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,669

    Re: Annoying Non-Error Errors

    Quote Originally Posted by Shaggy Hiker View Post
    Tried the clean, which had no impact. I have yet to try deleting the bin/obj folders. That seems off target, to me, as this certainly acts like an IDE bug. Still, it's worth a try.
    Yeah, the deleting of the folders is kind of the dev version of "turning it off and on again" ... Sometimes it helps, sometimes it doesn't, but usually also doesn't hurt.


    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  6. #6

    Thread Starter
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,373

    Re: Annoying Non-Error Errors

    I tried deleting the bin and obj folders. At first, that did nothing, as I got the errors back. I then rebuilt, and they went away. Rebuilding couldn't be the answer on it's own, because I had already tried that repeatedly, along with cleaning, prior to deleting the folders. So, it might be that deleting the bin and obj folders (or just one of them), then rebuilding, might solve the problem. More data points are needed to be sure. I have no doubt that I'll get more data points.
    My usual boring signature: Nothing

  7. #7
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,809

    Re: Annoying Non-Error Errors

    When not using version control and storing projects on a server I've had similar issues. Deleting the Obj and Bin folders sometimes works. Sometimes switching from a Debug run to a Release run helps.

    At times I just copy the project locally, work with it there, and then copy it back. That always works.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  8. #8

    Thread Starter
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,373

    Re: Annoying Non-Error Errors

    In other words, "fiddle around with things until it goes away."

    Yeah, that's kind of unsatisfying. It's gone for now, but I'm sure it will return. At that point, I'll get a new data point. I'll save it, too. I'm saving up to get a datatable. One day, perhaps I'll be able to have a whole dataset!!
    My usual boring signature: Nothing

  9. #9
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,809

    Re: Annoying Non-Error Errors

    Quote Originally Posted by Shaggy Hiker View Post
    ... I'll save it, too. I'm saving up to get a datatable. One day, perhaps I'll be able to have a whole dataset!!
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width