Using c# in visual studio code

Viewed 242

I am new to C# and I can't seem to figure out what I did wrong. I was coding in C# on vs code. At first, I was only getting code suggestions for keywords that I had already typed into my code. When trying to fix it to suggest any keywords that I could use, I think I broke it more. It now suggests more keywords, but when I type in what I want (that isn't one of the suggestions) and press ".", what I have written now automatically changes to the top suggestion. I am not sure if I did not download things correctly, but I tried to uninstall and re-install .NET SDK multiple times with no luck, same with the C# extension in vs code. If I open a terminal, click on output and select OmniSharp Log, I get:

Starting OmniSharp server at 6/16/2022, 8:19:22 PM
    Target: c:\Users\joe4a\FlightSim\Scripts

OmniSharp server started with .NET 6.0.301
.
    Path: c:\Users\joe4a\.vscode\extensions\ms-dotnettools.csharp-1.25.0-win32-x64\.omnisharp\1.39.0-net6.0\OmniSharp.dll
    PID: 13892

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on Windows 10.0.19044.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
        Checking the 'DOTNET_ROOT' environment variable to find a .NET SDK
[info]: OmniSharp.Services.DotNetCliService
        Using the 'dotnet' on the PATH.
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 1 MSBuild instance(s)
            1: .NET Core SDK 6.0.301 17.2.0 - "C:\Program Files\dotnet\sdk\6.0.301\"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: .NET Core SDK 6.0.301 17.2.0 - "C:\Program Files\dotnet\sdk\6.0.301\"
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.MSBuild.ProjectSystem
        No solution files found in 'c:\Users\joe4a\FlightSim\Scripts'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in 'c:\Users\joe4a\FlightSim\Scripts'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Did not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location 'c:\Users\joe4a\FlightSim\Scripts' on host 2812.
[warn]: OmniSharp.Roslyn.CSharp.Services.InlayHints.InlayHintService
        Inlay hints requested for document not in workspace Location { FileName = c:\Users\joe4a\FlightSim\Scripts\AircraftRotaion.cs, Range = Range { Start = Point { Line = 0, Column = 0 }, End = Point { Line = 24, Column = 1 } } }
[warn]: OmniSharp.Roslyn.CSharp.Services.InlayHints.InlayHintService
        Inlay hints requested for document not in workspace Location { FileName = c:\Users\joe4a\FlightSim\Scripts\AircraftRotaion.cs, Range = Range { Start = Point { Line = 0, Column = 0 }, End = Point { Line = 24, Column = 1 } } }
[warn]: OmniSharp.Roslyn.CSharp.Services.InlayHints.InlayHintService
        Inlay hints requested for document not in workspace Location { FileName = c:\Users\joe4a\FlightSim\Scripts\AircraftRotaion.cs, Range = Range { Start = Point { Line = 0, Column = 0 }, End = Point { Line = 24, Column = 1 } } }
[info]: OmniSharp.OmniSharpWorkspace
        Miscellaneous file: c:\Users\joe4a\FlightSim\Scripts\AircraftRotaion.cs added to workspace
Received response for /v2/getcodeactions but could not find request.

Does this have to do with the code suggestions? I am not too familiar with OmniSharp, .NET, or C# and am not sure what these warnings mean (or if they are even related to my original problem)

0 Answers
Related