Cannot Create Workspace In Visual Studio For Mac

It is easy to configure Visual Studio Code to your liking through its various settings. Nearly every part of VS Code's editor, user interface, and functional behavior has options you can modify.

VS Code provides two different scopes for settings:

  • User Settings - Settings that apply globally to any instance of VS Code you open.
  • Workspace Settings - Settings stored inside your workspace and only apply when the workspace is opened.

Workspace settings override user settings.

Click on 'Manage Workspaces' button. Click on 'Add' When the window pops up, I add a working folder and map the remote directory with my local directory and check 'Local Workspace' checkbox. When I hit 'Ok', the error: 'Cannot create the workspace. Please, try again.' I'm unsure why this is happening. I have installed visual studio mac on my mac. I have installed the tfs extension on visual studio mac. I have connected to the tfs server in our server in office. It successfully connected and it display the collection. BUT it says it has 0 projects. There should be 4 projects in that collection. User has admin permissions so it shouldnt be the case. Every workspace has a name, which is used to identify the workspace. As you can see from Figure 1, workspaces are tied to a Team Project Collection, so you cannot create a workspace that spans multiple project collections.

Visual Studio on a Mac: The Best of Both Worlds With these tweaks, I’ve come to love using Visual Studio on a Mac. The performance is good, and by running Windows in a virtual machine, I get the best of both OS worlds. Initially I was searching Visual studio for any option to delete it something like Right click delete optionJ, unfortunately there is no option like this; I don’t understand why Microsoft is not providing nice GUI interface for TFS management just like other Microsoft servers. The Visual Studio for Mac workspace should be familiar to existing Visual Studio developers. When you first open it, you see a Welcome Page with a list of recently opened solutions, a feed of developer news and other information to help you get started. Do we use a bunch of different tools to handle these task or do we find a way to get TFS to work on a Mac. Considering the name of this article is 'How to use TFS on a Mac' and not 'How to use various other products to replace TFS on a Mac', i'm guessing you can figure which option we chose!

Creating User and Workspace Settings

To open your user and workspace settings, use the following VS Code menu command:

  • On Windows/Linux - File > Preferences > Settings
  • On macOS - Code > Preferences > Settings

You can also open the Settings editor from the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)) with Preferences: Open Settings or use the keyboard shortcut (⌘, (Windows, Linux Ctrl+,)).

In the example below, the color theme and the icon theme have been changed.

Changes to settings are reloaded by VS Code as you change them. Modified settings are now indicated with a blue line similar to modified lines in the editor. The gear icon opens a context menu with options to reset the setting to its default value as well as copy setting as JSON.

Note: Workspace settings are useful for sharing project specific settings across a team.

Settings editor

When you open the settings editor, you can search and discover settings you are looking for. When you search using the Search bar, it will not only show and highlight the settings matching your criteria, but also filter out those which are not matching. This makes finding settings quick and easy.

Note: VS Code extensions can also add their own custom settings and they will be visible under an Extensions section.

Edit settings

Each setting can be edited by either a checkbox, an input or by a drop-down. Simply edit the text or select the option you want to change to the desired settings.

Settings groups

Default settings are represented in groups so that you can navigate them easily. It has a Commonly Used group at the top which shows popular customizations.

Below is a copy of the default settings that come with VS Code.

Settings file locations

By default VS Code shows the Settings editor, but you can still edit the underlying settings.json file by using the Open Settings (JSON) command or by changing your default settings editor with the workbench.settings.editor setting.

Depending on your platform, the user settings file is located here:

  • Windows%APPDATA%CodeUsersettings.json
  • macOS$HOME/Library/Application Support/Code/User/settings.json
  • Linux$HOME/.config/Code/User/settings.json

The workspace settings file is located under the .vscode folder in your root folder.

Note: In case of a Multi-root Workspace, workspace settings are located inside the workspace configuration file.

Language specific editor settings

To customize your editor by language, run the global command Preferences: Configure Language Specific Settings (command id: workbench.action.configureLanguageBasedSettings) from the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)) which opens the language picker. Selecting the language you want, opens the Settings editor with the language entry where you can add applicable settings.

If you have a file open and you want to customize the editor for this file type, click on the Language Mode in the Status Bar to the bottom-right of the VS Code window. This opens the Language Mode picker with an option Configure 'language_name' language based settings. Selecting this opens the Settings editor with the language entry where you can add applicable settings.

You can also configure language based settings by directly opening settings.json. You can scope them to the workspace by placing them in the workspace settings just like other settings. If you have settings defined for a language in both user and workspace scopes, then they are merged by giving precedence to the ones defined in the workspace.

The following examples customize editor settings for language modes typescript and markdown.

You can use IntelliSense in Settings editor to help you find allowed language based settings. All editor settings and some non-editor settings are supported.

Settings and security

Visual Studio

Some settings allow you to specify an executable that VS Code will run to perform certain operations. For example, you can choose which shell the Integrated Terminal should use. For enhanced security, such settings can only be defined in user settings and not at workspace scope.

Here is the list of settings not supported in workspace settings:

  • git.path
  • terminal.integrated.shell.linux
  • terminal.integrated.shellArgs.linux
  • terminal.integrated.shell.osx
  • terminal.integrated.shellArgs.osx
  • terminal.integrated.shell.windows
  • terminal.integrated.shellArgs.windows
  • terminal.external.windowsExec
  • terminal.external.osxExec
  • terminal.external.linuxExec

The first time you open a workspace which defines any of these settings, VS Code will warn you and subsequently always ignore the values after that.

Default settings

Below are the Visual Studio Code default settings and their values. You can also view the default values in the Settings editor.

Common questions

Workspace In Visual Studio

VS Code says 'Unable to write settings.'

Workspace

If you try to change a setting (for example turning on Auto Save or selecting a new Color Theme) and you see 'Unable to write settings. Please open User Settings to correct errors/warnings in the file and try again.', it means your settings.json file is ill-formed or has errors. The errors can be as simple as a missing comma or setting value. Open the Settings editor File > Preferences > Settings (Code > Preferences > Settings on macOS) (⌘, (Windows, Linux Ctrl+,)) and you should see the error highlighted with red squiggles.

How can I reset my user settings?

Visual studio

The easiest way to reset VS Code back to the default settings is to clear your user settings.json file contents in the Settings editor. Delete everything between the two curly braces, save the file, and VS Code will go back to using the default values.

X Code

X code

Cannot Create Workspace In Visual Studio For Machine

When does it make sense to use workspace settings?

If you're using a workspace that needs custom settings but you don't want to apply them to your other VS Code projects. A good example is language-specific linting rules.