How to remove the following error in VScode: zsh:1: command not found: msbuild - visual-studio-code

I have recently started writing my LaTeX documents in VScode on my Mac running Big Sur.
I am able to build my .tex files without issue using the built in "Build LaTeX project" option (the green arrow -- short cut OPT+CMD+B). When I try to build the .tex file with CMD+SHIFT+B, however, the terminal pops up with the following text:
Executing task: msbuild /property:GenerateFullPaths=true /t:build /consoleloggerparameters:NoSummary
zsh:1: command not found: msbuild
The terminal process "/bin/zsh '-c', 'msbuild /property:GenerateFullPaths=true /t:build /consoleloggerparameters:NoSummary'" failed to launch (exit code: 127).
Terminal will be reused by tasks, press any key to close it.
Despite this, the .tex file is still built as normal. My question is: why is this happening and how do I fix it?
Thanks!

Related

Jupyter extension for VSCode on Linux throws error when doing anything Jupyter related

After installing code-oss on Manjaro Linux along with the Jupyter extension for code and jupyter-notebooks itself, the extension seems to error when I try to do anything Jupyter related inside code. If I try to create a new notebook from the command pallete, it pops up a dialog saying this:
Command 'Jupyter: Create New Jupyter Notebook' resulted in an error (command 'jupyter.createnewnotebook' not found)
Code then tells me that the extension activation failed and to open the chrome developer console for more information. This is what the chrome console then says:
extension activation failed Error: Extension 'ms-toolsai.jupyter' CANNOT use API proposal: notebookEditor. Its package.json#enabledApiProposals-property declares: but NOT notebookEditor. The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api ms-toolsai.jupyter
Initial Pop-up error
Chrome Console error
You can solve that problem by inserting"enable-proposed-api": ["ms-toolsai.jupyter"] in the start settings of vs code. So press CTRL+ALT+P -> "Preference: Configure Runtime Arguments" then insert the upper line. After that restart vscode.
Had the same problem and found out this is happening because of the open source version of code - OSS. It does not have the proper config in the product.json.
The accepted solution to add to Runtime Arguments unfortunately didn't work on Arch.
Easiest solution for me was to install code-features from AUR.
You can find more info on arch wiki site
Or directly on microsoft docs regarding oss code issues.
The solution to add "enable-proposed-api": ["ms-toolsai.jupyter"] to the runtime of vscode didn't work for me on Arch linux. But when I started vscode from the command line using the argument "--enable-proposed-api ms-toolsai.jupyter" the problem was solved. So I created a custom desktop launcher for this:
Fist, copy the desktop launcher to your applications folder
$ cp /usr/share/applications/code-oss.desktop ~/.local/share/applications/.
Then edit the new file:
$ nano ~/.local/share/applications/code-oss.desktop
Now add "--enable-proposed-api ms-toolsai.jupyter" to both of the Exec lines like so:
[Desktop Entry]
Name=Code - OSS
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/usr/bin/code-oss --enable-proposed-api ms-toolsai.jupyter --unity-launch %F
Icon=com.visualstudio.code.oss
Type=Application
StartupNotify=false
StartupWMClass=Code
Categories=TextEditor;Development;IDE;
MimeType=text/plain;application/x-code-oss-workspace;
Actions=new-empty-window;
Keywords=vscode;
[Desktop Action new-empty-window]
Name=New Empty Window
Exec=/usr/bin/code-oss --enable-proposed-api ms-toolsai.jupyter --new-window %F
Icon=com.visualstudio.code.oss
I restarted my computer and the problem was solved.

Cargo build broke after using VS code

For a while I have been editing my Rust program with Pycharm Professional. However, I was curious and experimented with VS Code. At first my project was compiling and running. However, it suddenly started throwing a pretty wild error on cargo build and cargo run (while cargo check is fine), even in cmd outside of VS Code:
error: linking with `link.exe` failed: exit code: 1104
= note: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.30.30705\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "C:\\rust\\book\\target\\debug\\deps\\book.1apvyby1qhuehv3.rcgu.o" "C:\\rust\\book\\target\\debug\\deps\\book.1cw7xmk0cjjg5uln.rcgu.o" "C:\\rust\\book\\target\\debug\\deps\\book.1e8ho0j4rykowhcr.rcgu.o" "C:\\rust\\book\\target\\debug\\deps\\book.1g2fbveo2gp7bxds.rcgu.o"
..............
..............
= note: LINK : fatal error LNK1104: cannot open file 'C:\rust\book\target\debug\deps\book.exe'
book is the name of my project.
I am on Windows 10, System Type: x64-based PC.
VS Code version 1.63.2
Sometimes VSCode file watcher watches the files in target/, that is not good.
So open the Settings, search for exclude, and in all "list-like" cofigurations add **/target/**, do a cargo clean and restart VSCode. This should fix this and future problems
Had to remove the directory, and redownload the whole project(used Git).

The terminal process failed to launch in VSCode (macOS)

When attempting to run/debug my VSCode extension, I'm getting the following error:
The terminal process "/usr/local/bin/zsh '-c', 'npm run watch'" failed to launch (exit code: 127).
I have set terminal.integrated.shell.osx to my zsh location in settings but it’s still failing for some reason. When I run /usr/local/bin/zsh '-c', 'npm run watch' from iTerm it runs fine.
How can I fix this error?
I'm also wondering if this is the reason all my breakpoints are unbound when I set them.

New Flutter Project not opening in VS Code

I have been trying to open a new Flutter Project in VS Code using the command palette. The output shows:
"flutter create --ios-language swift --android-language kotlin .
/usr/bin/env: ‘bash’: No such file or directory
exit code 127
"
How to solve it?
/usr/bin/env: ‘bash’: No such file or directory exit code 127
The VS Code extension tries to spawn Flutter using shell execution, and is trying to run bash. I suspect your PATH environment variable has been set incorrectly and no longer contains a valid bash binary.

Eclipse (2018-09) CDT project with Cygwin, can't debug the binary

It seems that everything cygwin-related configured and works fine in my Eclipse project, for example Eclipse is able to invoke 'make' or 'gcc', and can even run the compiled binary and show the output in the Eclipse console window.
However, when I try to debug my binary within Eclipse, I get the following error:
Error in final launch sequence:
Failed to execute MI command:
-exec-run
Error message from debugger back end:
During startup program exited with code 0xc0000135.
Failed to execute MI command:
-exec-run
Error message from debugger back end:
During startup program exited with code 0xc0000135.
During startup program exited with code 0xc0000135.
I do able to launch gdb from my Cygwin console, so it is installed correctly (I assume). But why it fails when I try to use it from Eclipse?
For my case, as you say, it turns out that adding the Cygwin bin folder to the PATH variable solves this problem.
I use Eclipse 2020-06 and Cygwin 64bit on Win7 64bit. And installing Cygwin doesn't change the PATH variable currently.
But it is also confused to me that "build" and "run" work fine in Eclipse whithout the Cygwin bin in PATH.