Getting Error on Visual Studio Code for OmniSharp with .Net6 Windows 10
Answer a question Hi I normally use Visual Studio to create projects however was advised to try and use VS Code for a .Net6 project There are some errors I am getting in the compiler it starts with "C
Answer a question
Hi I normally use Visual Studio to create projects however was advised to try and use VS Code for a .Net6 project
There are some errors I am getting in the compiler
it starts with "C# extension Some projects have trouble loading. Please review the output for more details"
And these are the errors
Starting OmniSharp server at 10/01/2022, 19:56:35
Target: d:\DevProjects\Reactivities\Reactivities.sln
OmniSharp server started.
Path: c:\Users\Desktop\.vscode\extensions\ms-dotnettools.csharp-1.23.17\.omnisharp\1.37.17\OmniSharp.exe
PID: 13868
[info]: OmniSharp.Stdio.Host
Starting OmniSharp on Windows 6.2.9200.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 2 MSBuild instance(s)
1: Visual Studio Community 2019 16.11.32002.261 16.11.2 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin"
2: StandAlone 17.0.0 - "c:\Users\Desktop\.vscode\extensions\ms-dotnettools.csharp-1.23.17\.omnisharp\1.37.17\.msbuild\Current\Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: Visual Studio Community 2019 16.11.32002.261 16.11.2 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin"
[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 'd:\DevProjects\Reactivities'.
[info]: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
Detecting projects in 'd:\DevProjects\Reactivities\Reactivities.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for 'd:\DevProjects\Reactivities\API\API.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for 'd:\DevProjects\Reactivities\Application\Application.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for 'd:\DevProjects\Reactivities\Persistence\Persistence.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for 'd:\DevProjects\Reactivities\Domain\Domain.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in 'd:\DevProjects\Reactivities'.
[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 'd:\DevProjects\Reactivities' on host 11388.
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: d:\DevProjects\Reactivities\API\API.csproj
[warn]: OmniSharp.MSBuild.ProjectLoader
Targeting .NET 6.0 in Visual Studio 2019 is not supported.
[info]: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'd:\DevProjects\Reactivities\API\API.csproj'.
d:\DevProjects\Reactivities\API\API.csproj
C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.targets(134,5): Error: Targeting .NET 6.0 in Visual Studio 2019 is not supported.
[info]: OmniSharp.MSBuild.ProjectManager
Adding project 'd:\DevProjects\Reactivities\API\API.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: d:\DevProjects\Reactivities\Application\Application.csproj
[info]: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'd:\DevProjects\Reactivities\Application\Application.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
Adding project 'd:\DevProjects\Reactivities\Application\Application.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: d:\DevProjects\Reactivities\Persistence\Persistence.csproj
[info]: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'd:\DevProjects\Reactivities\Persistence\Persistence.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
Adding project 'd:\DevProjects\Reactivities\Persistence\Persistence.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: d:\DevProjects\Reactivities\Domain\Domain.csproj
[info]: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'd:\DevProjects\Reactivities\Domain\Domain.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
Adding project 'd:\DevProjects\Reactivities\Domain\Domain.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Update project: API
[info]: OmniSharp.MSBuild.ProjectManager
Update project: Application
[info]: OmniSharp.MSBuild.ProjectManager
Update project: Persistence
[info]: OmniSharp.MSBuild.ProjectManager
Update project: Domain
Received response for /v2/getcodeactions but could not find request
I am not sure why it is occurring, after searching I found out some are saying OmniSharp isn't compatible with .net6
If anyone has any solution please help, Thanks.
Answers
Try updating VS Code and Omnisharp to the latest versions. If does not help - install VS 2022 and try running VS Code again.
更多推荐
所有评论(0)