简体   繁体   中英

Visual Studio 2019 IntelliSense changed (how to get prior behavior?)

Since I switched to VS 2019 (from 2017) I am pretty sure I got a degraded IntelliSense experience. I looked for settings under Tools -> Options... but did not find anything helpful.

The matter is this: suppose I have a variable kvp that has a property Key, I could type "key.", scroll to the "Key" property (if this is not already selected) and then type ";" to complete the statement.

But this does not work anymore. Instead it now ignores what I selected and I get

key.;

The only way to get the selected property is to explicitly hit enter. Same when I type the first character(s) to select the desired option: when pressing; it just leaves what I already typed and adds the; immediately behind it, ignoring what I selected in the popup menu.

What happened and how do I get the proper behavior back?

I am using the Preview version but I already had a couple of updates and it does not improve so I guess it is by design or default behavior now.

Here's some of my code for Perry. It is just an example though, the problem (or what I regard to be a problem) occurs with any object variable.

private static void AddBlockNodes(TreeNode node, IDictionary<string, Block> blocks)
{
    foreach (KeyValuePair<string, Block> kvp in blocks)
    {
        string name = kvp.Key;
        Block block = kvp.Value;

        TreeNode childNode = new TreeNode(name);
        childNode.Tag = block;

        node.Nodes.Add(childNode);
        AddBlockNodes(childNode, block.Subblocks);
    }
}

it just leaves what I already typed and adds the; immediately behind it, ignoring what I selected in the popup menu.What happened and how do I get the proper behavior back?

It is quite an abnormal behavior and l have installed Visual Studio 16.6.0 Preview 2.1 and test your code in my side and it works well.

Type variable kvp. and then select property Key and it types as expected. I did not face missing property Key during the process.

You can try these steps to troubleshoot your issue:

Suggestion

1) reset all settings by Tools --> Import and Export Settings --> Reset all settings

2) close VS Instance, enter the project path and delete .vs hidden folder which stores some Intellisense settings, bin , obj folder and then restart your project again. I wonder if you migrate an old project into VS2019 preview version, I think you should complete this step.

3) disable any third party extensions if you have under Extensions-->Manage Extensions in case they cause this behavior.

4) delete all component caches under C:\Users\xxx\AppData\Local\Microsoft\VisualStudio\16.0_xxx(16.0 is VS2019)\ComponentModelCache

5) try to create a new project in VS2019 Preview version and test whether this issue persists in the new platform and if it works, I think it is an issue of your project itself. Or you can try to migrate your project into the new project.

Hope it could help you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM