How to fix Visual Studio syntax error tooltip not displaying? - ide

I have a problem in Visual Studio 2022, when I have syntax error and I hover over the underlined part in code, nothing happens.
E.g. I do not put ";" at end of line, it shows it as error in error list window, but hovering over it does nothing.
There should be some suggestions for fixes or more info about the error but there's nothing. The error list window does display the error message and all about it as excepted. I have tried repairing the VS, uninstalling and installing few times including deleting any leftover files I could have tracked on my system, but nothing helped. I reset all settings in VS too.
Any suggestions as to what to do?
Is there maybe some shortcut that enables/disables it that I could have accidentally hit?

Related

VS - vb file got corrupted - Unexpected token & Character is not valid

After launching my project in VS2019, I suddenly got a Character is not valid error, and I was not able to run my project anymore.
I didn't change anything. I even did some undo's just to be save, but no luck.
The error remained, and it didn't point me anywhere.
I restarted VS and then it even got worse.
I couldn't see my code anymore. I just see question marks, and 6995 errors, all (unexpected token and character is not valid).
I tried several things, including deleting the .suo file, the settings file.
Restarting the pc and so on.
Sadly enough the "Previous Version" history of Win10 is switched off, so I can't go to a recent backup.
If I click on the designer he gives me the folling error message:
If I continue, I see my designer file in the end.
When I double click on a button, to try and see the code, he gives me new code in the designer file. Which is really strange.
Any idea on how to solve this?

Visual Studio cannot start debugging

I'm working through a project in Visual Studio 2013 and I got the following error: "Visual Studio cannot start debugging because the debug target is missing". I've tried changing the build output path under Project -> Properties but it still doesn't work. So what gives?
Check your code and make sure you aren't missing a curly bracket anywhere. If one was accidentally deleted, moved, or misplaced, it causes this error among MANY others depending how critical the placement of the curly bracket is in your project.
^
I just recently had this problem in a project I was working on. I had highlighted to delete a section of code, and it took out a curly bracket with it. Unnoticed by myself, it took me a few days to finally realize that's what happened.
You won't get an error from the bracket missing, so it's stupid in itself and impossible to find at times.. but I had 51 errors, 7 warnings, and that "can't start debugging because the debug target is missing" error when I attempted to run the program, after the curly bracket went missing.
It's not to say that you might not have another issue going on that is causing this, but the curly brackets can wreak havoc if they aren't precisely placed. So it's worth checking into that before getting too extreme in options to "fix" the start error.
For future reference if this problem occurs again. Good luck.
Possible VS 2019 Solution
Right Click on Solution Properties
Go under Common Properties> Startup Project
Set Single startup project
Right Click on Project Properties
Click Application
Set Application Type to Windows Forms Application or Console Application or Windows Service
Click Startup Object
Set to Anything Other than (None)
Left Click on Project Properties
Set Copy Build Output to Output to True
Then Run
Hopefully that works for you

Can I get the VBA syntax check error without the automatic syntax check?

When I write VBA code, I tend to cut and paste variable names or other bits of code. This results in frequent syntax check errors that result in the message box popping up. That's annoying, and I'm aware that I can turn it off via Tools > Options > Editor > uncheck Auto Syntax Check.
This doesn't seem to prevent the VBA editor from actually checking my line - it still turns red. I don't mind that behavior, because it doesn't interrupt anything. And it does let me know if I do, in fact, have some sort of problem after I'm done with the line, which is nice. Unfortunately, I'm not always smart enough to diagnose the error on my own, and the text in the message box is actually helpful. But I've turned off the message box!
Is there a way for me to display that error, short of temporarily turning the message box on?
You can compile, with Debug>Compile, which will bring up the same message. IF there's more than one compile error you might have to deal with that one first.
This comment is for users of Visual Basic for Excel on a Mac.
I am using Visual Basic in Excel verion 16.14.1, (the latest version as of July 2018), as part of Office 365 on an iMac Pro, running High Sierra.
Under the Tools tab of the Visual Basic editor, there are only three choices:
References...
Macros....
VBA Project Properties......
None of these sub-menus lead to "Options", nor to anything which allows you to turn on and off "Auto Syntax Check"
Instead that option can be found in Excel ==> Preferences tab. However. checking or unchecking the box does not change the behaviour. In both cases, the text turns red on a syntax error, but in neither case does the annoying pop-up window appear.

VS2005 immediately runs my older code when an error occurs

For years, I had this behavior when writing VB.NET code with VS2005:
If my code contains a syntax error, when I hit F5, a popup would ask
something like "do you want to stop... or run a previously compiled
version of this code?"
(I would always hit STOP. Not sure why anyone would want to run a prior edition of their code, instead of the code you are trying to write/fix NOW.)
Yesterday, something changed. Now even blatant errors like "callll ThisCodeDoesntExist(xxx.zzz)" just immediately runs my older code. No popup. No choice. No warning. No error. Nothing.
Did I accidentally change some compiler option(s)? Where would I even begin to look for this?
I'm running vs2010 so I'm not sure if there will be any difference but try the following steps:
Click 'Tools' in the main toolbar (file, edit... etc.)
Click 'Options...'
Check 'Show all settings' (on vs2010 this is at the bottom left of the window)
Expand 'Projects and Solutions'
Click on 'Build and Run'
Then under 'On Run, when build or deployment errors occur:' select 'Prompt to launch'
I assume you're current set up has 'Launch old version' in the combobox. Hope that helps!

Debug Triggering Build Errors (File Not Found) and Antivirus Program, Visual Basic (V11 2012)

I made some changes in my code and when I went to debug my program I got a build error. The error prompted my anti-virus software (Avast) to block my program as a "suspicious file".
Visual Studio returned this error:
Error 1 Could not copy the file "obj\Debug\CopyFile.exe" because it was not found.
Here is a run down of the events that occurred before this error began to happen.
Added new menu item to menu strip.
Replaced instances of radio button references in the code with the new menu items.
Ran a debug, program worked fine, until I clicked a button.
Found the remaining instances of radio button references in the code and replaced them.
Ran a debug, program was working fine. Exited debug.
Deleted the old radio buttons from the GUI. (They no longer had any references in the code.)
Tried to debug, received an error, antivirus software blocks program exe file as suspicious.
Error Could not copy the file "obj\Debug\CopyFile.exe" because it was not found.
What did I do to the code to cause this? Did I possibly delete some other area of the code on accident and I do not know? I can't see why my program won't debug.
Why don't you simply tell to your antivirus software to do its business in some other places than your working directory? ( Exclude Paths ) and ignore every action done by Visual Studio executables ?
By the way, this is one of the first things to do to get better performance when working with a complex IDE like VS that can create, move, delete thousands of files when working.
If I remember well, the AVAST has its exclusion list in File System Shield, Expert Settings, Exclusions