What is the Difference between folder and workspace?

The VSCode 1.53 (Jan. 2021) mentions the new article "What is a VS Code "workspace"?"

What is a VS Code "workspace"?

A Visual Studio Code "workspace" is the collection of one or more folders that are opened in a VS Code window (instance).

In most cases, you will have a single folder opened as the workspace but, depending on your development workflow, you can include more than one folder, using an advanced configuration called Multi-root workspaces.

The concept of a workspace enables VS Code to:

  • Configure settings that only apply to a specific folder or folders but not others.
  • Persist task and debugger launch configurations that are only valid in the context of that workspace.
  • Store and restore UI state associated with that workspace (for example, the files that are opened).
  • Selectively enable or disable extensions only for that workspace.

You may see the terms "folder" and "workspace" used interchangeably in VS Code documentation, issues, and community discussions.
Think of a workspace as the root of a project that has extra VS Code knowledge and capabilities.

Note: It is also possible to open VS Code without a workspace. For example, when you open a new VS Code window by selecting a file from your platform's File menu, you will not be inside a workspace. In this mode, some of VS Code's capabilities are reduced but you can still open text files and edit them

https://code.visualstudio.com/assets/docs/editor/workspaces/multi-root-workspace.png

The same article adds:

What is the benefit of multi-root workspace over a folder?#

The most obvious advantage is that a multi-root workspace allows you to work with multiple projects that may not be stored inside the same parent folder on disk.
You can pick folders from anywhere to add to the workspace.

Even if you are mainly working in a single-folder-based project, you can benefit from using .code-workspace files.
You can store multiple .code-workspace files inside the folder to provide a scoped folder-view of certain aspects of the project depending on the scenario (for example client.code-workspace, server.code-workspace to filter out unrelated folders from the File Explorer).
Since .code-workspace files support relative paths for the folders section, these workspace files will work for everyone independent of where the folder is stored.

Finally, if for some projects you want to apply the same set of workspace settings or tasks/launch configurations, consider adding these into a .code-workspace file and add/remove these folders from that workspace.


vscode --> WorkSpace

In workspace we have privilege to save our setting at the workspace level, not only this here you can open multiple folders in a workspace.If you want to do either of those things, use a workspace, otherwise, just open a folder. In vscode there is list of project's folders and files.A workspace can contain multiple folders. You can customize the settings and preferences of a workspace.

A workspace is a folder, or multiple folders, mapped to areas in TFS. When code is checked out of TFS, the code is stored locally based off your workspace mappings. When you make changes to your code files, you are making those changes locally, to the files contained in your workspace.

One of the main reasons for workspaces is isolation. It provides a private sandbox where code changes can be made without having to worry if the changes will affect other team members. The changes remain in the local workspace until are checked into TFS.

TFS was designed to allow for one or more workspaces on the same machine. A single workspace can be created that contains multiple team projects and their code, or a more targeted workspace that only contains a particular project. There is no hard and fast rule for the best way to create workspaces. It will depend on personal preference, methodology, environment and the like.

Reference

vscode --> folder

When we want to work on single folder irrespective of their dependencies or in-dependencies and when we wants to opens a new instance of VS Code scoped to the selected folder OR to the folder containing the selected file.

Reference