How to completely uninstall VS Code on Windows? - windows

What is the way to totally uninstall Visual Studio Code and its extensions, including all configurations, etc.) on Windows 10?
I tried uninstalling and installing but it remembered its previous settings.

Open Run (Win + R)
Type %appdata%
Press Enter
Delete the folder Code
Voila! Restart Visual Studio Code and it is reset!
Here is a bat script which does the same thing:
explorer.exe %appdata%
del Code

Here is the complete solution you can apply:
Go to where Visual Studio Code is installed and invoke 'uninst000.exe'.
In my case it is installed in C:\Users\Shafi\AppData\Local\Programs\Microsoft VS Code
Delete directory C:\Users\Shafi\AppData\Roaming\Code
Delete directory C:\Users\Shafi\.vscode

Turns out the extensions are stored under %USER%.vscode\extensions. Deleting that gets rid of them.
%USER%\\.vscode\extensions (or) %USERPROFILE%\.vscode\extensions

Go to Path: C:\Program Files\Microsoft VS Code
Double Click
uninstall.exe
This will uninstall VS Code from Your Windows OS
and
After uninstallation delete code folder also.
Open Run (Win + R) and Enter %appdata% Press Enter
Delete the folder code.

Easy way to remove it
Step1: to find VSCode path
Example: C:\Users\Willie\AppData\Local\Programs\Microsoft VS Code
Step2: to run unins000.exe

Find the location C:\Users\ (your username) Shah907\AppData\Local\Programs\Microsoft VS Code Insiders.
Click on "unins000.exe" and open it to uninstall.
Now find C:\Users\Shah907 and delete " .vscode-insiders " folder.
Now delete " Code - Insiders " in location " C:\Users\Shah907\AppData\Roaming ".
Now Reinstall the Visual Studio Code again.
Enjoy
Ref:DeepDecide

Since you use the word Completely, I would say
Do the regular Uninstall in "Apps & features."
In strat, search "environment variable" and remove all the references for `Visual Studio Code or any installation path.
In file Explore, type %APPDATA% and remove the folder called Code.
And got to %LOCALAPPDATA% and deleted the folder code if it exists.
Got to %USERPROFILE%\AppData\Roaming and remove the folder code
This will remove all your configurations and the extensions
FYI: Uninstall Visual Studio Code by code.visualstudio.com

Related

Visual studio: How to open visual studio in current folder from cmd line

Does anyone know how to open Visual studio from the command line from the current
working directory. I know that when using VS code this is very simple. You just type code . and it works. Here, I'm searching for the Visual studio equivalent.
Anyone an idea?
Found it:
devenv ./mysolutionname.sln
To get this to work, you need to make sure that devenv is contained in your PATH variable.
Also you need to run this cmd as an administrator. You can open a window from your file explorer in your current folder as an administrator, by typing ALT-F and then use arrow button||letters to navigate. Press Enter on cmd|powershell as administrator.
Tip: If you start from an empty folder, you can use dotnet-cli to create a empty sln file
dotnet new sln mysolutionname
Also you can create a new project and add it to the solution using the dotnet-cli
dotnet new console -n myprojectname
dotnet sln add myprojectname
According to the documentation there's no such switch. There is no way to set the curent working directory. But you can open an existing solution.

Opening visual studio solution from a linux drive

I just upgraded from Win7 to Win10 and I noticed the following change, that I don't explain for now.
I used to checkout my source code on in a mounted linux drive (\myremote\myaccount\ as X:)
before I was able to open visual studio 2008 solution (.sln file) and build but since the upgrade to Win10, devenv fails when I double click on a sln, saying that:
The following files were specified on the command line:
X:\blahblah\myproject\myproject.sln
These files could not be found and will not be loaded
but I can open and save that sln file using a text editor.
Note that my devenv run as Administrator.
Any idea ?

" 'devenv' is not recognized as an internal or external command ..."

Is there a way to just open a VS project from the command prompt? For example, the way with Atom, you can navigate to the folder you'd like to open and just run "atom ." Does that kind of utility exist for VS?
edit: Would the equivalent to this be "C:\> devenv /run SomeSolution.sln" ?
if so, great! But there still seems to be a problem because I think the "devenv" command should at least be recognized, but I currently get
'devenv' is not recognized as an internal or external command,
operable program or batch file.
I saw that a S/O contributer recommended adding
C:\Program Files (x86)\Microsoft Visual Studio
10.0\Common7\IDE\devenv.exe
to the PATH environment variables values like this, per MSDN, which I did, but I get the same message.
Can anyone explain what might be going on and how to fix it? Thanks
You need to add new path to existing Path value.
Complete solution:
Go to MyComputer >> Properties >> Change Settings >> Advanced >> Environmental variables
Click on Path value on bottom pane, and then click Edit.
Add new path to your devenv.exe folder location.
For me this is "D:\Program Files\Microsoft Visual Studio Community 2017\Common7\IDE\"
This is much easier than it looks. Go to the root directory for the project, type the name of the .sln file, and hit Enter. Windows knows how to use the registry o find devenv.exe based on the extension of the file you run.
For example:
cd \Projects\SampleApp
SampleApp.sln
This technique is the same as if you opened the sln file by double clicking it in Explorer.
On similar issue, for VS 2017, I wanted to build a solution, below worked fine:
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.exe" Project.sln /build
VS 2019 Community
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe
Any Visual Studio Version
To find your specific devenv.exe path regardless of VS copy/version you can use cmd and then run:
cd \
dir /s divenv.exe
Note: The command dir /s may take a few minutes to find it.
Since I had no desire to update my PATH variable, I used the following steps to run devenv on the command prompt:
Navigate to the Visual Studio shortcut on the Start menu
Right-click the shortcut
Click on properties
Copy the path displayed in Target. This is the path to whatever version of devenv that you use.
Paste the copied path into the command prompt and press enter

Visual studio does not install .vsix files

I've both VS 2012 and VS 2013 installed on my computer. The problem is that when I download an VSIX-File and open it with the Visual Studio version selector the file gets opened by VS but instead of installing it. VS opens the file as if it was an unknown binary format.
The attached image shows how VSIX-files are opened (happens with every file ... this is just an example):
I faced the same issue. Just use the VSIXInstaller to install the extension.
You can open "Developer Command Prompt for VS2012" tool in Start -> Microsoft Visual Studio 2012 -> Visual Studio Tools. On the console, run the below command:
VSIXInstaller <path to vsix file>
Open "Developer Command Prompt for VS2015" as administrator.
Type VSIXInstaller.exe vsixFilePath
Note that this way wouldn't work with me and gives me "Path to vsix file 'G:\Roslyn' is invaild or you don't have required access permissions". To solve this you need to put the path in a double quote like this:
VSIXInstaller.exe "G:\Roslyn SDK.vsix"
I got into a weird situation where in a fresh install of W10 and VS2015 Community, the Player Framework vsix installation won't start, either by dbl click or from command prompt using VSIxInstaller.exe, and would show no message at all. The solution was to open an elevated command prompt (run Developer Command Prompt for VS2015 as administrator) and then type VSIXInstaller.exe worked.
I am not clear whether you want to install or just view the contents of VSIX. If you want to install the extension, you just need to double click it and it will install (Do not try to open it with VS Version selector). If you want to see what is inside VSIX, it is basically an archive. So either try to use program like 7-zip to open it else, rename .vsix to .zip and then unzip it.
Further, there is also a chance that you have wrongly associated vsix files to be opened with Visual Studio. In such a case it will open in Visual Studio any case.
Finally, if you have wrongly associated the vsix to open with Visual Studio, try installing the extension using VSIXInstaller.exe found in C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\VSIXInstaller.exe
To add to the other answers, if the VSIX files either doesn't have an associated program to open with or opens with the wrong application, selecting the VSIXInstaller.exe as the associated commands re-enables the ability to double-click and directly install it (without the need to do it via commandline).
I faced a similar issue when I first installed VS 2017. This is what worked for me.
Resolution:
Restart VS 2017.(I hadn't restarted it before installation)
Install it from Tools->Extension & Updates.Search for "Perforce" and install.
I double clicked on this and it installed just fine.
Couldn't do it on VS2013 through the extensions dialog.
for me the problem was the extension InstallerProjects was on network server so I had to copy it to my machine (local) and it worked

MS C++ 2010 and mspdb100.dll

Microsoft's C++ compiler and linker seem to have an odd relationship with mspdb100.dll. When run from the IDE, of course, the compiler and linker work fine. When running either one from the command line, I get an error.
No problem, I located the DLL and copied it to the directory. Now the compiler works fine, but the linker dies.
I could solve the problem by adding "%VS10%\Common7\IDE" to my PATH, but for various reasons (performance, system purity, OCD, etc), I don't want to do that. Why is this setup so touchy, and is there anything else I can do to solve it?
try running path\to\VC\bin\vcvars32.bat from within your current shell first. This should ensure your command-line setup will match the IDE-setup.
This is not a permanent fix -- you need to do it every time you launch a new shell.
You could probably also find some way to add everything that's in that .bat permanently to the environment variables, but.... like you asked, why the heck doesn't the MS install do that already?
Add Microsoft Visual Studio 10.0\Common7\IDE to your path, and this issue will not exist any more. You will be able to build without running this silly batch file every time.
I noticed when I installed Microsoft Visual Studio 2010 Express that under the "Microsoft Visual Studio 2010 Express" folder in the Start Menu, there is a link to "Visual Studio Command Prompt (2010)", which sets up all the necessary environment variables when opened. That way you shouldn't have to edit you PATH variable.
This shortcut runs the following:
%comspec% /k ""C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"" x86
If it's not convenient to use the shortcut, perhaps you could learn something of use from investigating what this .bat file does?
I met same error,it is because we installed a vs2010 x86 version to a x64 system...
Open two folders:
C:\Windows\Microsoft.NET\Framework\v4.0.30319
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin
You will find two cvtres.exe. Righ click, select Properties, then Details. Delete the older version, and cmake will work well.
I hope this may help you.
Thanks to "zhoudongao" # http://bbs.csdn.net/topics/390121452?page=1#post-394768226.
I know this is a bit dated but if anyone's looking for a way to get compiler running from command line; here's what I did to get it running.
I'm using Win7 32bit and Visual Studio 2010. I created a small batch file in C:\Windows. open cmd prompt at C:\Windows as admin, then type the following:
copy con cl.bat
#"C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\vcvars32" %1 %2 %3 %4 %5 %6
#"C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\cl" %1 %2 %3 %4 %5 %6
then press f6 and hit enter again.
Obviously the path you will use is the install path to where you installed Visual Studio.
You now have working command line compiler from any location or directory in windows. To test this go to desktop and open cmd prompt as admin; I prefer to use Ctrl+Shift and right click then choose open command prompt here.
At command prompt type "cl" (without quotes) and hit enter. you will see a message "Setting enviroment for using Microsoft Visual Studio 2010 x86 tools"
type "cl" and hit enter again and you will get your compiler info. you're all set to compile.
enjoy!
Maybe it will help somebody...
I solved this problem by adding
PATH += %PATH_TO_VS_IN_YOUR_SYSTEM%/Common7/IDE;
to nvcc.profile.
Of course, %PATH_TO_VS_IN_YOUR_SYSTEM% is actual path to Visual Studio in your system.
Old, but maybe still valid:
For me "C:\Windows\System32" somehow got missing from the PATH variable.
Adding the missing folder to the path solved this error. See also VS2010 command prompt gives error : Cannot determine the location of the VS Common Tools folder
if you try to run the tools from the windows cmd.exe directly then you need to set the environments by running the vcvars32.bat file which will set the environment for you. instead you can run the visual studio command prompt which will run vcvars32.bat automatically. if you still have the problem then it's definitely the famous path variable problem.
make sure the "path" variable in the environment has the "c:\windows\system32\" value added to it , because the .bat file will need it to configure the VC tools.
this problem and the like usually happen because of installing many development platforms on the machine which might probably change the path variable.
check this..
https://schrievkrom.wordpress.com/2011/01/25/error-cannot-determine-the-location-of-the-vs-common-tools-folder/

Resources