On Visual Studio (VS) Code, coding on C#. I'm trying to generate assets to build and debug and I'm getting the following error message: Unable to generate assets to build and debug. OmniSharp server is not running.
I'm running:
So far I've tried unistalling VS code and the C# extention, I updated the omnisharp.path to latest at settings.json and updated the powershell version.
The code I'm trying to generate the assets for build and debug does run, so I'm uncertain where else I should look for the source of the problem.
If you require any more details feel free to ask
Note that the C# for VS Code Extension (OmniSharp) now requires .NET 6 SDK or newer or a Full Framework runtime and MSBuild tooling. See requirements section. After setting the extension setting omnisharp.useModernNet to false and installing Mono, I was able to able to generate assets to build and debug normally with the VS Code extension.
Finally I've downgraded VS Code C# extension from 1.25.0 to 1.24.4, and it worked perfectly. The Omnisharp server is not running error can result from a problem in your project.json causing issues with dnu restore. e.g. Issues resolving packages for one of the target frameworks?
Select the Command Palette using Ctrl + Shift + P and select the option "OmniSharp: Restart Omnisharp" Using the Command Palette, select the option " NET: Generate Assets for Debug and Build " The launch.json and tasks.json files will be added under the .vscode folder This solution worked for me.
I only need to select "OmniSharp: Restart OmniSharp" in the Command Palette. I completely uninstalled the C# extension. Reinstalled it and change the Omnisharp timeout to 15 seconds (initially was 60). Works like a charm. Click f1 key or ctrl+shift+p to open the textbox to enter your command.
This worked for me:
Ctrl + Shift + P
Then type the command:
OmniSharp: Select Project
Install the C# Extension, once installed click on the arrow on the side of the uninstall button and then click install another version. First I tried one from 2 months ago, it did not work, then I tried one from 6 months and it worked perfectly!
CTRL + SHIFT + P
Use of the command :
OmniSharp: Restart OmniSharp
worked for me
Ended up discovering the issue. I needed to add a PATH variable to C:\Windows\System32 in the System Variables. Now it works as intended.
Adding the variable depends on your Windows version. You should be able to find guides on adding Paths to your Environment Variables. Here's Microsoft's guide.
As for which path variable you need to add it'll look something like: C:\Windows\System32\WindowsPowerShell\v.1.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With