Could not locate .NET Core Project

Viewed 1843

I am following a brackeys tutorial for c# here. But at 7:55, A message pops up for me saying: "Could not locate .NET Core project. Assets were not generated.". I have done everything brackeys did before that moment, but it won't work. Here is an image of the popup:

popup of error

Any help would be appreciated! Also, do not hesitate to ask for any clarification from me.

5 Answers

Try this:

  1. Uninstall the C# extension in VSCode
  2. Ctrl+Shift+P Extensions: Disable Auto Updating Extensions [Enter]
  3. Ctrl+Shift+P Extensions: Install from VSIX... [Enter]
  4. Reload VSCode

try this:

  • Close all instances of Visual Studio Code.
  • Open the folder that contains the project you are trying to compile/use.
  • Delete the .vscode folder. (Make a backup if needed of any important files/configurations made already.)
  • Open the folder in VSCode now.
  • Open VSCode Command Palette and choose > .NET: Generate Assets For Build and Debug.

As others have commented on another question and on this page, restarting Visual Studio Code usually solves the problem. This is caused by the c# for Visual Studio Code extension.

Restarting the vscode application solved my issue.

Related