Making Global Tasks in VS Code

后端 未结 4 1356
孤独总比滥情好
孤独总比滥情好 2021-02-03 17:58

Is there a way to make \"global\" tasks, or do I always need to copy the same tasks.json into every project directory. VSCode seems to require that the task be in a .vscode dire

4条回答
  •  不要未来只要你来
    2021-02-03 18:49

    User level tasks is an available feature since VSCode January 2020 (version 1.42).

    From the Release Notes:

    Tasks declared in tasks.json are now supported at the User Settings level. If you have a build script that you use across many projects, or if you don't want your tasks in a project folder, you can add your tasks in the user tasks.json file. Run the Tasks: Open User Tasks command to create user level tasks and these tasks will be available across all folders and workspaces. Only the shell and process task types are supported here.

    In the Command Palette (CTRL + SHIFT + P) type:

    > Tasks: Open User Tasks
    

提交回复
热议问题