skip to Main Content

Whenever I make any project with either C++ or C# it says I don’t have a project. I have read the https://code.visualstudio.com/docs/csharp/debugging, but it didn’t help.

The error image is here
But I have a script

I have made sure I had the extensions and I made sure I was doin every thing correctly. Maybe my visual studio code IDE is corrupt.

2

Answers


  1. Chosen as BEST ANSWER

    Hey sorry I realized I'm a idiot and VS code doesn't have a inbuilt compiler for C++.On the VS code website hit docs and on the left hand side scroll to C++ and select your operating system and it will explain how to get the compiler and connect it to VS code.


  2. It will create the required project files.

    1. Make Sure the Project is Setup Correct

    Be sure you have a. csproj or . The . sln file is a Global file, normally it should be copied and saved in your project’s directory . This files are required so that Visual Studio Code will be able to understand, identify and interact with your project appropriately.
    If you do not have these files you can, for instance, create a new project with the . NET CLI:
    bash
    Copy code

    dotnet new console –o MyProjectName
    

    This command will create the necessary files for the project as will be seen in the next step.

    1. Check Workspace Settings
      Open your workspace settings and ensure that the OmniSharp: It reveals that the setting of Project Load is enabled. This setting lets OmniSharp (the language server for C#) to load projects.
      To access workspace settings, go to File > Preferences > Settings and search for "OmniSharp: Project Load Project load refers to the amount of work that a project constitutes from the commencement of the project until the end The definition is derived from the fact that a project takes time hence a project load is the amount of work that the project entails with regard to time constraints.

    2. Reload OmniSharp
      In some cases, OmniSharp may lock up. You can force it to reload by opening the Command Palette (Ctrl+Shift+P), typing "OmniSharp: Pressing the “Ctrl” key and clicking on “Restart. ”

    3. Install . NET SDK
      Ensure that the . To use NET SDK, it is assumed that you have NET SDK installed in your system. In order to substantiate this you start your terminal and type the DotNet command followed by the version as in DotNet – version. If not installed, it could be downloaded from the According to . NET download page.

    4. Make Your Partition Match Your Workspace
      Make sure that the right folder in Visual Studio Code contains all files of your project. Sometimes if you have navigated to subfolder or to a wrong directory Visual Studio Code may fail to recognize the project.

    5. Check for Updates
      Ensure your Visual Studio Code is the latest, and also the C# extension (OmniSharp) that runs the IDE is equally the newest.

    6. Reinstall Extensions
      If none of the above methods are effective, the final thing that you can do is to remove the C# extension and install it all over again. The problem might be arising from corruption in the extension.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search