dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.86k stars 673 forks source link

Cannot generate C# assets for build and debug #5311

Open garym247 opened 2 years ago

garym247 commented 2 years ago

The following error is reported

"Unable to generate assets to build and debug. OmniSharp server is not running."

I have tried uninstalling/installing the C# extension, also uninstalling/installing VS Code

JoeRobich commented 2 years ago

@garym247 Can you please share the OmniSharp Log from the VS Code Output pane? As well as, the output from running dotnet --info from a terminal.

garym247 commented 2 years ago

Hi Joe,

Installing .Net6 and then restarting the Omnisharp sevice in VS Code managed to fix it.

yoshiask commented 1 year ago

I'm having this issue too. Installing the latest .NET 6 SDK and restarting OmniSharp did not fix it.

widada commented 1 year ago

I'm having this issue too. any suggestions to fix this ?

MarkDevGuy197 commented 3 months ago

Hey guys! What's up? I'm learning C# too and I had solve this problem with these steps:

The Steps

  1. Switch your C# extension for the most actual version(Release Version) in the extension page.
  2. Restart all extensions at the same page.
  3. Open the Run&Debug menu.
  4. Open the Command Pallette and write: ">.NET:", when the option for Generate Assets apear press Enter.
  5. Before you execute the Run & Debug, make sure to select the option: ".NET Core Launch (console)" and go ahead!

How I program with C# language using Visual Studio Code?

My Problems Persists

If your problems persists, try to install all necessary extensions/tools for code in C# language. And try to search the anwer in forums and Youtube videos. Don't give up!

Thank you for your attention!