Intellisense in Visual Studio 2017 is hiding members from the autocomplete list - vb.net

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.

Related

Visual Studio replaces DataTable with TypedTableBase

Using Visual Studio 2008 in order to compile for Windows Mobile 6 devices, I get an issue where changing anything involved in a DataSet results in the error genasm.exe(1): error There was an error finalizing type. GenericArguments[0], 'Mobile_Verification.ScanData+TRANSRow', on 'System.Data.TypedTableBase1[T] violates the constraint of type parameter 'T'. on the next build.
Selecting this error takes me to Microsoft.CompactFramework.Common.Targets, where there is an error on
<Target
Name="BuildAsmmeta"
Condition="'#(None)'!=''">
<BuildAsmmeta <!-- This is where the error is -->
.....(contents)
>
stating The element 'Target' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element 'BuildAsmmeta' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. List of possible elements expected: 'Task, PropertyGroup, ItemGroup, OnError in namespace http://schemas.microsoft.com/developer/msbuild/2003'. Kind of strange for automatically generated code.
On comparing source controlled code to the new code, I find that Visual Studio has changed all instances of
Inherits Global.System.Data.DataTable
Implements Global.System.Collections.IEnumerable
to
Inherits Global.System.Data.TypedTableBase(Of MyRowName)
Now, in the past, when this has popped up, I've been able to just revert my changes so everything is happy. Now, however, I have some changes of substance to make to the dataset, so I would really like to make this not be an issue anymore.
Searching for solutions, however only seems to give fixes going in the opposite direction: Visual Studio forcing a DataSet when a TypedTableBase is expected. Digging in seems to suggest that the issue might have been introduced to our code when we upgraded from .NET CF 2.0 to 3.5. Apparently TypedTableBase is just the way to do things now, and Visual Studio is enforcing the new paradigm. The fixes suggested here do the exact opposite of what I need.
All well and good, except something is apparently broken in the translation. So now I'm left with three options:
Keep manually fixing it every time I need to change the DataSet
Prevent Visual Studio from automatically changing my DataTables to TypedTableBases.
Figure out what is broken in the new TypedTableBase implementation, and fix that. Specifically, since the error is only being thrown in Common.Targets, and there isn't anything showing in my code, what part of my code is it exactly that the auto-generated code is having a problem with, and how do I get it working?
I would try to find any more details to give, but my boss is telling me it's time to get out of the office. If there is anything else that might shed some light, let me know and I can look for it tomorrow.
Thank you.

Where has the Code Analysis window gone?

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:

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.

Can't use FAXCOMEXLib in VS 2010 anymore?

I'm just in the process of moving from Visual Studio 2008 to Visual Studio 2010.
One of my projects use the Microsoft Fax Service Extended COM Type Library. After converting the project to VS 2010 I get the following compiler error:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1558,9): error MSB3648: The Keycontainer-path "VS_KEY_812A0248FF872DEC" ist invalid. KeyContainer must point to an existing file.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1558,9): warning MSB3283: Wrapperassembly for type library "FAXCOMEXLib" not found.
I tried to remove FAXCOMEXLib from the project and adding it again, but it did not help.
I got a similar problem with other COM references.
How do I resolve this?
It is a known bug. Take a look at this Microsoft Connect entry which has a workaround.
this might not be relevant for you any more, but might be so for others. I've had the same problem recently and in my searches I found this list of common FAXCOMEXLib errors. I helped me, in any case.