Visual Studio Code Permanently Deletes Files - visual-studio-code

Deleting a file from within Visual Studio Code permanently deletes the file, instead of sending it to the recycle bin. Why is that?

With the 0.5.0 release of VS Code files and folders deleted from the explorer will be moved to the OS trash from where you can also restore them.

Related

workbench.js is removed in Visual studio code version 1.70.0

I notice that since version 1.70.0, VSCode has removed %localappdata%\Programs\Microsoft VS Code\resources\app\out\vs\code\electron-browser\workbench folder.
Hence it broke extensions that rely on the file workbench.js in this folder.
Is there any workaround for this problem or the extensions need to be re-written?
these files have moved to
resources\app\out\vs\code\electron-sandbox\workbench

Visual Studio Code deleted files after crash

Visual Studio Code has crashed and deleted all files and all file changes I've been working on for the last 5 days, although I've saved them. Is there any solution for recovery ...
If you are using Windows, your Visual Studio code files can be found at %appdata%/Code/Backups
If you are using MacOS, then you can find all your Visual Studio code files at
$HOME/Library/Application Support/Code/Backups
Same problem for me. The entire vs-code folder is empty!
I searched the recycle bin, vs-code backup folders, recovery tools for deleted files but found nothing.
Thanks to the message below, I found a copy of the code in the folder:
%appdata%/Code/User/History

Unable to find the TF executable while adding tfs to VSCode

I am adding TFS to Visual Studio Code IDE(1.42.0) for that I have installed Azure Repos extension.
In VS code at File-->Preference-->Setting-->Tfvc:Location, when I am entering path C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\tf.exe.
Getting error
(team) Unable to find the TF executable. Please ensure TF is installed
and the path specified contains the filename.
How can I solve this issue?
Edit 1: After installing Azure Repos extension, I am entering above path in tfvc:Location(for both tabs User and Workspace), but after entering path nothing happens. Check below screenshot
Edit2: Now I am getting this error at right below in VS code IDE
Since you have not got any help yet. I will take a shot. Any chance there is a issue with finding the executable and casing for the extension? My local TF is capitilized. \TF.exe
Also might want to checkout the Github and readme for TFVC.
Make sure you have installed VS on your computer. With a typical installation of Visual Studio, the Windows version of the TFVC command line client (tf.exe) is available under the Program Files (x86) folder. It will typically be placed in a location similar to C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\TF.exe. On the 2017 version of Visual Studio Community, it can be found in a location similar to C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe.
I found a .vscode folder in my project
delete it, close and reopen vscode solved the problem

VsCode - Update .njsproj

While working for a js project on vs code and vs 2019 synchronously. Is there any way to update .njsproj automaticly file when adding a new folder and file on vs code? Thus, those files can be include solution explorer for vs 2019 without manuel selecting files.
Update:
I created an extension to sync .njsproj file on vs code automatically.
Vs Code .njsproj Extension
VS Code does not have built-in support for synchronizing Visual Studio project files.
You could try:
An extension could provided this feature. This one claims it can, but I have not tested it
Write a simple script that updates your njsproj based on current folder contents.
If you are only using the project to open a set of files in VS, switch to use open folder as workspace instead.

VS Code update removed extension

In the following folder I created a new language for VS Code C:\Program Files\Microsoft VS Code\resources\app\extensions\mynewlanguage
Today I updated VS Code to v1.17.2.
After VS code update, this folder doesn't exist anymore. Is it normal? Where should I have created my language? Did I lose all my work?
Thanks, David
Yes, that is normal. The C:\Program Files\Microsoft VS Code\resources\app\extensions folder is reserved for extensions that VS Code ships with by default. It appears that this folder is overwritten upon each update, which would clear out any files you put there.
The place where all extensions from the marketplace go (and where you should have put your custom extension) is in C:\Users\[USERNAME]\.vscode\extensions.
Chances are high that unless you made a backup of the extension somewhere else, your work is lost.