Questions tagged [omnisharp]

OmniSharp provides refactoring and AST support for the C# language for a variety of plugins written for popular text editors, including Vim, Emacs, Atom, Sublime Text, VS Code, and Brackets.

OmniSharp is a family of Open Source projects, each with one goal - To enable great .NET development in YOUR editor of choice. ~ omnisharp.net)

Background

OmniSharp Server, a project started by Jason Imison was written with the intention of providing refactoring and AST support for the C# language for Vim and later Emacs. Initially it was intended for own use, but grew in popularity and has had wide adoption in the game development community and developers writing C# on non Microsoft platforms.

Support has since been extended by the community to include Atom, Sublime Text and Brackets. OmniSharp has grown to be an umbrella term referring to the server and all plugins.

Today OmniSharp offers a lightweight alternative to traditional IDE's for developers wishing to write in their favourite editors. Offering code completion, formatting and other popular refactoring operations, syntax checking and easy code navigation.

309 questions
0
votes
0 answers

picture doesn't appear after edit. MySQL database picture directory as null

I am currently on the way of creating a web site using c# .net framework. I can add picture, name, explanation and price. When click on edit and change something the picture that i uploaded doesn't show up. I checked for the problem and realised…
0
votes
1 answer

Omnisharp + Neovim does not detect csharp files that are not loaded in the buffer

Omnisharp is not able to autocomplete for any files in the same solution unless the referenced file is opened in a new buffer. Notes: Running :LspInfo shows the correct root directory; Neovim version is 0.5 The error is The type or namespace name…
SleepySwords
  • 1
  • 1
  • 1
0
votes
1 answer

When we create a Web Application project in Visual Studio 2019, but when we open in VS Code and use dotnet cli it gives Microsoft.targets errors

Below is the error when we run dotnet cli commands such as "dotnet build" or "dotnet run" in the terminal. error MSB4019: The imported project was not found. Confirm that the expression in the Import declaration "C:\Program…
Aditya
  • 67
  • 1
  • 12
0
votes
1 answer

The .NET Core SDK cannot be located

In vscode on my macbook running macos big sur i'm not able to use c# with the dotnet core in vs code, i keep getting this error(link to a picture down below). I tried countless things including appending the path that goes to the core to the…
haardikg
  • 29
  • 1
  • 5
0
votes
1 answer

OmniSharp.MSBuild.ProjectManager Attempted to update project that is not loaded: csharp

Okay, I know that there are already like 100 answers and ways to solve this, but I have tried everything and it just doesn't work. So here is the error that appears on the console [fail]: OmniSharp.MSBuild.ProjectManager Attempted to update…
Diegoa87
  • 169
  • 1
  • 1
  • 13
0
votes
1 answer

How to push LSP Diagnostic using OmniSharp LanguageServer?

I'm using OmniSharp's C# LSP server to implement a simple parsing/language service for a VS Code plugin. I've managed to get the basics up and running, but I've not been able to figure out how to push diagnostic messages to VS Code (like in this…
gplumb
  • 712
  • 6
  • 29
0
votes
2 answers

File not saving after BufWritePre command?

I'm attempting to use a tiny autocmd to format my code before saving: autocmd BufWritePre *.cs :OmniSharpCodeFormat I expected this to run the code formatter, and then save the output. Instead, it runs the code formatter, which correctly changes…
Nate
  • 420
  • 1
  • 5
  • 17
0
votes
0 answers

Omnisharp on linux apperently starts but fails to load project and outputs errors on visual studio code

According to output information omnisharp starts but cant load projects on ubuntu. this is the error message [fail]: OmniSharp.MSBuild.ProjectLoader The "CreateAppHost" task failed unexpectedly. System.UnauthorizedAccessException: Access to…
bigpod
  • 1
0
votes
1 answer

Nullable Interface does not trigger CS8602

I've encountered a few times now where I have nullable enabled and a property or field marked as a nullable interface type (with an appended ?), then if I go to use the property or field without a null check, I receive no error. (I would expect…
ehiller
  • 1,346
  • 17
  • 32
0
votes
1 answer

As of today omnisharp doesn't start properly (The "CheckForDuplicateFrameworkReferences" task could not be loaded from the assembly [...])

The full error: The "CheckForDuplicateFrameworkReferences" task could not be loaded from the assembly /usr/lib64/dotnet/sdk/5.0.100/Sdks/Microsoft.NET.Sdk/targets/../tools/net472/Microsoft.NET.Build.Tasks.dll. Invalid Image Confirm that the …
rune
  • 79
  • 10
0
votes
0 answers

Omnisharp format a whole directory?

I made some changes to my omnisharp config and want to reformat all of my source, but the only way I actually know of to invoke omnisharp formatting is the VSCode format on save option. How do I run the formatter recursively in a directory?
puzzl
  • 833
  • 9
  • 19
0
votes
1 answer

The type name 'SqlConnection' could not be found in the namespace 'System.Data.SqlClient'

I'm using VIM text editor to write C# code in Linux and having this issue. I've read that using the same namespace in different files is obviously fine, and made sure spelling wasn't a problem... It also doesn't seem like it's a problem with the…
Parker
  • 11
  • 1
  • 2
0
votes
2 answers

namespace can't be found by omnisharp even though unity builds

I am using vscode to edit unity scripts, I've added Mirror for needs, which extends its own namespace, but the problem is that omnisharp can't find it's namespace. All Mirror's files are under Assets/Thirdparty/Mirror Everything works in terms of…
0
votes
1 answer

NVim Omnisharp-Vim autocomplete on tab not working

Using NeoVim and autocomplete is not completing the suggestion. For example: I get the popup when start typing a word such as public. I just start typing pu and then the dialogue pops up to suggest the full word, but when I hit tab is just adds a…
Mark Johnson
  • 575
  • 4
  • 20
0
votes
1 answer

Keep local copy of Nuget Package in VS Code

In Visual Studio Code, i would like to keep a local copy of a referenced Nuget package in the project folder for the case the package will not be available online for some reason in the future. nuget restore shall still be able to download it from…