dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.85k stars 670 forks source link

reference count between lines #4625

Open electricalArt opened 3 years ago

electricalArt commented 3 years ago

Environment data

dotnet --info output:

.NET SDK (reflecting any global.json):
 Version:   5.0.202
 Commit:    db7cc87d51

Runtime Environment:
 OS Name:     fedora
 OS Version:  34
 OS Platform: Linux
 RID:         fedora.34-x64
 Base Path:   /usr/lib64/dotnet/sdk/5.0.202/

Host (useful for support):
  Version: 5.0.5
  Commit:  2f740adc14

.NET SDKs installed:
  5.0.202 [/usr/lib64/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 5.0.5 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 5.0.5 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

VS Code version: 1.56.2, x64 C# Extension version: v1.23.12

OmniSharp log

it is huge, so I will place here only start. Further there are only the same type repeats

Starting OmniSharp server at 6/22/2021, 4:49:30 PM
    Target: /media/terrobyte/dev_2021-07jun-14/c#_2021-06jun-05/Troelsen_yasik-programmirovaniya-csharp-7/MySummary-2021_4apr_16/dotnetCoreVersion/dotnetCoreVersion.sln

OmniSharp server started.
    Path: /home/art/.vscode/extensions/ms-dotnettools.csharp-1.23.12/.omnisharp/1.37.10/run
    PID: 7212

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on fedora 34.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 1 MSBuild instance(s)
            1: StandAlone 16.11.0 - "/home/art/.vscode/extensions/ms-dotnettools.csharp-1.23.12/.omnisharp/1.37.10/omnisharp/.msbuild/Current/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        MSBUILD_EXE_PATH environment variable set to '/home/art/.vscode/extensions/ms-dotnettools.csharp-1.23.12/.omnisharp/1.37.10/omnisharp/.msbuild/Current/Bin/MSBuild.exe'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: StandAlone 16.11.0 - "/home/art/.vscode/extensions/ms-dotnettools.csharp-1.23.12/.omnisharp/1.37.10/omnisharp/.msbuild/Current/Bin"
            CscToolExe = csc.exe
            MSBuildToolsPath = /home/art/.vscode/extensions/ms-dotnettools.csharp-1.23.12/.omnisharp/1.37.10/omnisharp/.msbuild/Current/Bin
            CscToolPath = /home/art/.vscode/extensions/ms-dotnettools.csharp-1.23.12/.omnisharp/1.37.10/omnisharp/.msbuild/Current/Bin/Roslyn
            BypassFrameworkInstallChecks = true
            MSBuildExtensionsPath = /home/art/.vscode/extensions/ms-dotnettools.csharp-1.23.12/.omnisharp/1.37.10/omnisharp/.msbuild
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/media/terrobyte/dev_2021-07jun-14/c#_2021-06jun-05/Troelsen_yasik-programmirovaniya-csharp-7/MySummary-2021_4apr_16/dotnetCoreVersion'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
        Detecting projects in '/media/terrobyte/dev_2021-07jun-14/c#_2021-06jun-05/Troelsen_yasik-programmirovaniya-csharp-7/MySummary-2021_4apr_16/dotnetCoreVersion/dotnetCoreVersion.sln'.
[warn]: OmniSharp.MSBuild.ProjectSystem
        Found project that doesn't exist on disk: /media/terrobyte/dev_2021-07jun-14/c#_2021-06jun-05/Troelsen_yasik-programmirovaniya-csharp-7/MySummary-2021_4apr_16/dotnetCoreVersion/CommonShareableTypes/CommonShareableTypes.csproj
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/media/terrobyte/dev_2021-07jun-14/c#_2021-06jun-05/Troelsen_yasik-programmirovaniya-csharp-7/MySummary-2021_4apr_16/dotnetCoreVersion'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location '/media/terrobyte/dev_2021-07jun-14/c#_2021-06jun-05/Troelsen_yasik-programmirovaniya-csharp-7/MySummary-2021_4apr_16/dotnetCoreVersion' on host 7059.
[warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService
        No document found. File: /media/terrobyte/dev_2021-07jun-14/c#_2021-06jun-05/Troelsen_yasik-programmirovaniya-csharp-7/MySummary-2021_4apr_16/dotnetCoreVersion/32-ReflectionForAttributes_TrueOfReflectionLateBindingAttributes.cs.
[warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService
        No document found. File: /media/terrobyte/dev_2021-07jun-14/c#_2021-06jun-05/Troelsen_yasik-programmirovaniya-csharp-7/MySummary-2021_4apr_16/dotnetCoreVersion/32-ReflectionForAttributes_TrueOfReflectionLateBindingAttributes.cs.
[warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.
...

Steps to reproduce

actually I don't know. I see that intelliSense doesn't start with file open, so I need to change something to start it. maybe it is a broken start?

Expected behavior

reference count in correct places

Actual behavior

vscode-intellisense_2021-06jun-21

JoeRobich commented 3 years ago

@Narick9 Thanks for reporting this. Is this the location the codelens is added when you simply open the folder and file without making any edits?

Do you remember what types of edits had you been performing in this file before you saw the off codelens placement? Applying code fixes? Cut and paste? Changing git branches while the file was open?

Although it should be unrelated to the codelens placement issue, I did see the following warning in you omnisharp log. If the project has moved or been deleted, you may want to update your sln file.

[warn]: OmniSharp.MSBuild.ProjectSystem
        Found project that doesn't exist on disk: /media/terrobyte/dev_2021-07jun-14/c#_2021-06jun-05/Troelsen_yasik-programmirovaniya-csharp-7/MySummary-2021_4apr_16/dotnetCoreVersion/CommonShareableTypes/CommonShareableTypes.csproj
electricalArt commented 3 years ago

Is this the location the codelens is added when you simply open the folder and file without making any edits?

No, I need to edit something to start codelenses

Do you remember what types of edits had you been performing in this file before you saw the off codelens placement? Applying code fixes? Cut and paste? Changing git branches while the file was open?

Regular adding, removing, cutting and pasting

I did see the following warning in you omnisharp log

Rather this project isn't program. So I quite rare fix errors and warnings here

electricalArt commented 3 years ago

But I should say that I edit all files with Vim extension