Where has the Code Analysis window gone? - code-analysis

In Visual Studio 2013, I used the Code Analysis window to provide reports to both the Development and Management teams.
In Visual Studio 2015 Enterprise RTM, these errors have returned to the error window and I can no longer just see CA issues for a single project, or filter them by type.
Is there a way to bring the Code Analysis window back?

Visual Studio Code Analysis has been merged with Intellisense and can now be viewed from the Error window. When you select "Build+Intellisense" or "Intellisense" your code analysis warnings will show up there. You no longer need to build your solution to see them there.
This is one of the perks of the new Roslyn based editor.
Setting it to Intellisense Only should show you your code Analysis Warnings and on the left there is now an option to select "Entire Solution", "Current Project", "Current Document" or "Open documents".
I personally really like the last option, as it works really well for people wanting to leave the campground cleaner than they found it.
If you add additional analyzers (through a vsix or Nuget), they show up as additional rules for Code Analysis.
You can add the "Category" column:
And then filter by category:

Related

How do I make Intellisense sort alphabetically?

How do I configure Intellisense to sort alphabetically in Visual Basic in Visual Studio 2019?
I don't have and don't want Resharper. But if that's the only way to get Intellisense to sort alphabetically, I might be forced to consider installing it.
So far I've:
disabled the extension Visual Studio Intellicode.
found nothing helpful at Menu > Edit > Intellisense > *
found nothing helpful at Menu > Tools > Options > Text Editor > Basic > Intellisense.
found nothing helpful here on StackOverflow.
found nothing helpful on Google.
Normally, Visual Studio’s IntelliSense will help to let the IntelliCode suggested codes(methods, properties) to show at the very beginning of the Completion List and usually they will with a * mark. Following them are normal codes(methods, properties) which should be sorted alphabetically.
There are many options for changing behaviors of IntelliSense in Visual Studio, but indeed they are few. To my knowledge, there is no option to change the order of the default completion list(IntelliSense). But actually, the default order is alphabetical.
Suggestions:
If you installed some extensions which may affect the IntelliSense/text editor, please try to disable them(or try to run VS in safe mode), and you may see the IntelliSense sort alphabetically.
You can also try to repair VS(in VS Installer), or reset VS settings(choose General on step 4) to avoid the impact from VS and related settings.
If you are still trapped by this issue, feel free to let me know, and perhaps you can share a screenshot or some steps which may be useful for me to reproduce your issue and check deeper:)

Intellisense in Visual Studio 2017 is hiding members from the autocomplete list

I am currently using Visual Studio 2017 Enterprise and I have run into a problem that I am sincerely hoping is just because I have not found the correct setting. In Visual Studio 2017 I am missing members from my Intellisense list as seen in the comparison pictures below between VS2017 and VS2015.
From the two images you can see that VS2017 is not showing the Count property whereas VS2015 is. VS2017 is also not showing IsReadOnly, IsSyncronized, SyncRoot if I scroll down it's list.
There must be something I am doing wrong, but I can't seem to get these members to show.
Here is another example comparing DataGridViewRow members:
In this image you can see VS2017 is missing AdjustRowHeaderBorderStyle, DataBoundItem.
Refer to your description, I have reproduced this issue and reported this issue to the VS Product Team, please check this: VB-Windows Forms: the list members of 'DataGridView.SelectedRows.' miss some members, please add a comment and waiting for the feedback from the Product Team engineers.
Meanwhile, I found we can still use those missing members like ‘Count’ and there is no error reminder.

visual studio 2017 slow at renaming textbox

I have a medium size project coded in vb.net using latest version of 2017 visual studio.
The problem that I am having right now is that when I edit a textbox say txtCarType to txtCarType2 it takes about 15 seconds to process.
I am also having the same issue with labels or renaming any control. how can I fix this issue this lagging its killing productivity.
Visual Studio is trying to be generous and refactor the new name throughout your project. This indeed helps as if it does not refactor you could be left with some errors. When you rename controls a refactor window pops up as it churns through files to refactor the name through-out the whole project. This indeed can be dreadful, irritating and possibly a long process depending on your solution/projects.
Please give this a shot...
Tools --> Options --> Windows Forms Designer (expand node)
General --> Refactoring (set "Enable Refactoring on Rename" to False)
Hope this helps!
Off the top of my head it could be one of 2 things.
It's just running a bit slower because of the size of your application. Trying to sort through all that data takes time, so it's just gonna take a few seconds to find what it needs and change it.
Refactoring for all references to the object in your code to prevent errors.

How to prevent Visual Studio from displaying double values with 18 decimal places

Recently I noticed in my current vb.net project that sometimes (depending on the value), if I enter a double value the editor changes my input, for example:
When I type ...
Dim x As Double = 0.6
...after commiting the line by pressing Enter it becomes:
Dim x As Double = 0.59999999999999998
If I directly undo the action, then it gets reverted back to the original value I typed in. Any future edit in that line will again produce the undesired results.
I'm aware that internally 0.6 is calculated as 0.59999999999999998 so it doesn't make a difference for the running application, but it's very annoying and the strange thing is: this hasn't always happened and, if I create a new project, it doesn't happen there either.
So my questions are: How can I prevent VS from doing this? Why does it happen at all? Why isn't it always like this (previously in my current project or in a new one)?
I'm running 64bit-Windows 8.1 on an Intel CPU - if that has anything to do with it.
Has anyone got any ideas?
EDIT: I'm using Visual Studio 2013 Professional (12.0.31101.00 Update 4) and, yes, the project has been migrated from several earlier VS versions. There are no relevant Add-Ins or extensions installed. Disabling "Pretty Listing" does indeed prevent the problem, but of course then the other highly useful aspects of the option are disabled as well :o(
EDIT2: After the tip leading to "Pretty Listing" I found the following SO article, but there also no solution was found: Visual Studio VB pretty listing settings
Several years ago I had a project where this was happening. As you wrote, the reason for the number is that some numbers can't be represented exactly in a binary floating point variable. More on this here.
My project had been upgraded through several versions of Visual Studio. It was also shared with developers using VS Express.
If I ran into this problem again today I would open and check the project-file manually, or just simply create a new project and re-add the files if I could not quickly locate the problem and the project was small enough.
If you have upgraded the project through multiple versions of Visual Studio like I had, it might be dragging some settings along that are no longer visible in the projects options dialog.
Just as an interesting experiment you could also try to turn off Visual Studio's Pretty Listings to see if that is what is actually changing your code.

Only Shows Error List For One vb File

I'm kind of new to Visual Studio. I've built a few simple programs in it, but now I'm in the process of rewriting a huge system I wrote in VBA. What is frustrating me is the Error List in VS is only listing errors for one .vb File in my project, lets call that VBFile1. Now, when I work on another vb File, VBFile2, which is in the same project as VBFile1 no red squiggles or errors are listed for VBFile2. I don't understand how this could happen. This is what I've tried/checked:
Filter is set to 'Current Project' and I played around with the other Filter settings but no change.
Checked the Text Editor under Options and according to the research that I've already done it is fine. Plus, I have never changed any of these settings anyway.
Closed and re-opened Visual Studio.
Closed all open files in the Project and still displays the same error list
Close all files except the VBFile2 but still shows the same error list of VBFile1.
I have Visual Studio 2012 Ultimate. I feel like this should be an easy fix...I just am really confused what's going on.
Hope this makes sense!
UPDATE: Excluded from project, VBFile1 and finally errors are listed for VBFile2...why would this be?
I am not sure if it has been fixed in Visual Studio 2012, but there is a Connect Request for Visual Studio 2010 with a resolution of won't fix because of performance issues. The effect your are seeing is because you have exceeded the maximum number of errors for that project (what I am used to seeing is 102 as the threshold), it will not show you anymore till you fix the ones that it has already shown you.
According to this MSDN article, which I found through this SO question the limitation is still there for the IDE but has been removed for the command line compiler.
From above MSDN Link:
Limitless (Command-line) Errors!
This is actually a good thing, let me explain. For performance reasons, the Visual Basic IDE maxes out at 101 errors (with error #102 being “Maximum number of errors exceeded.”) This can make it difficult to estimate the amount of work remaining in certain situations, particularly in upgrade scenarios. We have removed this limit from the command-line compiler in this release, though it still there in the IDE. What this means is if you want to know exactly how many errors there are for a project, just invoke the compiler through msbuild.exe or vbc.exe and you’ll get your answer.