0

I tried loading the solutions folder in Visual Studio Code however the build configurations are all wrong and I wasn't able to figure out how to tell VS Code which project to run.

To further complicate things I 'deleted' the folder structure in VS Codes solution explorer and now I can't see the folder structure when I try and load the same folder directory.

1 Answer 1

1

VSCode doesn't support the .sln files the same way as VS. It is a directory based editor first of all, not a full IDE. For example, the VSCode Explorer is used to browse, open, and manage all of the files and folders in your project (workspace).

All workspace settings are stored inside your workspace in a .vscode folder and only apply when the workspace is opened. Settings defined on this scope override the user scope. It may help to think about workspace as a root folder that was used to open the project in VSCode.

In general, to be able to build, debug and run the application in VSCode, you need to configure build task and launch configuration.

VS Code provides a conception of

  • tasks to allow actions like project building. Tasks are defined in task.json file;
  • launch configuration so you can run/debug app. Launch configs are described in launch.json.

VSCode looks for this files also in your workspace's .vscode folder.

During the configuration process, if you need to specify a path to something in your project, it is common practice to define it as a relative path to this workspace folder by using ${workspaceRoot} variable.

If you install C# for Visual Studio Code (powered by OmniSharp) extension, it helps you to generate appropriate configurations for .NET Core projects.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.