VisualStudio IntelliSense suggestion failure

Viewed 279

I have a problem with IntelliSense and it is driving me crazy, I kept calm for 1 month but I can't stand it anymore. IntelliSense keeps on suggesting things that are obviously incorrect suggestions.

Let's say I have a class called "PlayerModel" and a field/parameter of that type called "playerModel".

When I start typing "player" I somehow expect that the suggestions list will start with the field/parameter and not with the class, also given that the class obviously does not contain public constants or anything I might be using. But this is not the case, IntelliSense gives me this every time:

enter image description here

Obviously I want to refer to the parameter and not the class.

This doesn't work also if I need to assign a value to a field.

PlayerModel anotherPlayerModel = player...

will also suggest the class instead of that parameter. So every time I need to manually select the second (and proper) suggestion.

Please help, I think this should be common sense. Thank you!

These are my installation package details:

Microsoft Visual Studio Community 2017
Version 15.8.5
VisualStudio.15.Release/15.8.5+28010.2036
Microsoft .NET Framework
Version 4.7.02556

Installed Version: Community

C# Tools 2.9.0-beta8-63208-01
FormatDocumentOnSave 1.0
NuGet Package Manager 4.6.0
ProjectServicesPackage Extension 1.0
Visual Basic Tools 2.9.0-beta8-63208-01
Visual Studio Code Debug Adapter Host Package 1.0
Visual Studio Tools for Unity 3.8.0.7

And this is my PlayerModel class: (ignore the Unity related stuff it is not relevant to the structure of the class)

using UnityEngine;
using static Constants;

public class PlayerModel : ObjectModel {

    public int userId;

    public int activeItemIndex;

    public int kills;

    public PlayerModel(int id, Vector3 position, Quaternion rotation, float hitpoints, int userId, int activeItemIndex) : base(id, ObjectType.PLAYER, position, rotation, hitpoints) {
        this.userId = userId;
        this.activeItemIndex = activeItemIndex;
    }
}
1 Answers

Please try switching your locale--as a test--from 1026 bg-BG to 1033 en-US. So, first close all instances of Visual Studio, apply the locale change, then restart Visual Studio. I suspect that this might fix the issue. If it does then you can decide which international setting you want to continue to use...

Related