Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is Visual Studio Code ignoring my tasks.json file?

I have a problem with tasks.json, which I have simplified by reducing it to the following.

At the root of my Visual Studio Code project, clearly visible inside of the file explorer sidebar as a root folder is .vscode, and inside of .vscode is tasks.json. This was auto-generated for my by VSCode and I did not move the folder or the project or point VSCode to a different folder.

The contents of tasks.json is as follows:

{
    "version": "0.1.0",

    // The command is tsc. Assumes that tsc has been installed using npm install -g typescript
    "command": "tsc",

    // The command is a shell script
    "isShellCommand": true,

    // Show the output window only if unrecognized errors occur.
    "showOutput": "silent",

    // args is the HelloWorld program to compile.
    "args": ["test.ts"],

    // use the standard tsc problem matcher to find compile problems
    // in the output.
    "problemMatcher": "$tsc"
}

Please note that the original default value of "args" was ["HelloWorld.ts"], however I have simply changed it to ["test.ts"].

Now, when I press ctrl-shift-b, I get the following:

error TS6053: File 'HelloWorld.ts' not found.

Note that I do clear the output in the output window every time I attempt this. It looks like VSCode is ignoring my tasks.json file and is using default settings.

I am on Ubuntu 14.04.

like image 508
OCDev Avatar asked Sep 14 '25 05:09

OCDev


1 Answers

Sounds like you had a weird error... if you closed and reopened Visual studio code, it doesn't seem like that was the problem?

I have not heard of that kind of error happening before. If you continue to get it, open an issue on the vscode github repo.

Otherwise, I'd just assume it was one of those random OS issues solved by a reboot.

That's why I called it a sanity check. Often something simple like a reboot can solve a lot of weird memory/ram errors.

like image 107
Tobiah Zarlez Avatar answered Sep 17 '25 02:09

Tobiah Zarlez