How to configure Visual Studio Code extensions from command line - cmd

Installing Visual Studio Code extensions from the command line is very simple is very simple. But lots of extensions require additional configuration to work.
Example: https://github.com/shanalikhan/code-settings-sync#upload-your-settings-for-the-first-time
We have to open the command palette, type a specific command, the paste a Gist ID and hit Enter. Only then the extension can work.
Another example: https://github.com/wakatime/vscode-wakatime#installation
Here we have to restart/reload VSCode and then enter an API key before the installation is actually finished.
How can Visual Studio Code extensions be configured from the command line?

Got a reply on one of the extension's Github that this is not possible right now:
Currently its Limitation from Code, editor doesnt allow extension to perform actions from CLI
https://github.com/shanalikhan/code-settings-sync/issues/465#issuecomment-349903682
The related issue for Visual Studio Code was closed :(

Related

How to open a file from CLI using a text editor of my choice, if the name of application has multiple strings?

Im learning to use hyper terminal for my web development. I need to open a file directly from CLI using VSCode.
For opening it using notepad++ i can open it by writing
start Notepad++ filename.ext
But i want to open it with Visual studio code.For which i wrote
start Visual studio Code filename.ext
The name of vscode is shown as Visual studio Code in apps. Since it has multiple strings im getting error. how do i bind the name of application together.
Incase if i want to open through atom i write,it works fine.
start Atom filename.ext
How do i make it work.
I believe to open Visual studio code through the terminal you need to call it as 'code', so in your case it would be "start code filename.ext".
Be advised I am working in linux, it may be slightly different in windows. You can also look at the properties of vscode and it should say there how to open it.
I know this is a late answer, but maybe it will help others.
The command is: code filename.txt
To open Visual Studio code from your Hyper Terminal, just type: code .

How to create ps1 PowerShell file in Visual Studio?

This is my first post:) Nice to get help
Is there any option to do that?
I attached screenshot
You can install PowerShell tools for Visual Studio.
You could install it from Visual Studio gallery. Once installed,
Create a new project , you will see PowerShell listed like below.
Below blog series will walk you though it.
https://pleasereleaseme.net/getting-started-with-powershell-tools-for-visual-studio/

Is there an integrated console in visual studio community like the one in visual studio code?

I searched for an extension but I didn't find any consoles, I only found Terminals, which solves the problem but only when I'm running without debugging which is almost useless.
There are two extension tools in VS IDE called Open Command Line and PowerConsole
You could check them in your VS, it would help us to visit or run project file or command lines.

Integrate ESLint with Visual Studio 2015

I am using ESLint for JavaScript. I installed it in my machine and am able to run and check for the errors in the file that I want to. Everything is good but if I have to use it only from command prompt I have to manually run this for each file or a folder. I am thinking about integrating this into Visual Studio so that when I run it like "Run ESLint on solution" it will give a list of warnings/errors for all the JS files in the solution. Even if we can't do that, is it possible to select a file and to run ESLint on that file in Visual Studio 2015?
I added ESLint to external tools in Visual Studio:
But when I run it, it's not showing any errors or anything. It is just showing the details of the help command. How do I run this on a particular file?
Web Analyzer extension has now been built in to Visual Studio in the .NET Core Tooling Preview 1
Follow the link to download the installer for
.NET Core Tooling Preview 1
You can install Web Analyzer extension as well, but after the restart you will get a prompt:
You can use WebAnalyzer plugin for Visual Studio, which does JavaScript linting through ESLint. It should highlight javascript errors every time you save your file, so it's a bit nicer then doing it through the menu. If you don't want to use plugin, you can setup a new menu item in the Tools > External Programs menu. Make sure to use ESLint's visual studio formatter that should allow you to double-click on the error and have Visual Studio take you to the line where the error occurred.

Visual Studio 2015 - how to run: vs2015.1 rc.exe /override feed url <Path to feed.xml>

It happened that I cancelled an update when updating Visual Studio 2015 Community,
it cannot load the original solution I have had,
It gave such error:
Invalid entries passed to /FilterFeatureSelectionTree
then I searched on MSDN said to run:
VS2015.1 RC.exe /overridefeeduri
But it is said "Syntax incorrect in command"
Does anyone know how to run the above command successfully?
VS2015.1 RC.exe refers to the Visual Studio 2015 installer executable. So for example, if you saved the installer as C:\vs_community_ENU.exe and you want to use the English feed.xml, the command line would be:
C:\vs_community_ENU.exe /overridefeeduri "http://go.microsoft.com/fwlink/?LinkID=564093&clcid=0x409"
Note that the URL needs to be in quotes if executing from the command-line, otherwise the command-line interpreter might misinterpret the & in the URL and think that you're trying to issue multiple commands.
The best way to solve this is to download VS 2015 setup here: https://www.visualstudio.com/products/visual-studio-community-vs
then run the installer, choose "Modify" and select features you want install.
it did work for me as I wasn't able to install Python Tools from Visual Studio, but running the installer di solve the issue.
According log from failling installer, xml feed was alright, so previous answer cannot help.
Edit: I think the bug appears once you run the Web Platform installer, and if you cannot install it with VS installer, you should use Web Platform Installer instead
It looks like you need to know the path URI for the feed. MSDN says the syntax is
VS2015.1 RC.exe /overridefeeduri <Path to feed.xml>
You left off the last argument. The english feed URI is http://go.microsoft.com/fwlink/?LinkID=564093&clcid=0x409. The page you linked contains the URIs for other languages if needed.
I wasn't also able to install Python Tools from Visual Studio. Then I resolved this issue by trying multiple trial and error steps.
Trial 1:
I researched to find out the installer that installed the MSVS2015 in my Machine.As it was my office PC the installation was pushed out by the IT. The installer I found was at this directory
C:\ProgramData\Microsoft\VisualStudioSecondaryInstaller\14.0\installers\VS_SDKV1\en\0\vs****.exe
then I applied the following command
C:\ProgramData\Microsoft\VisualStudioSecondaryInstaller\14.0\installers\VS_SDKV1\en\0\vs****.exe /overridefeeduri feed.xml
After doing this My VS became unresponsive. I could not start it from the start menu.I thought I have by any chance damaged my Installation.Now I moved forward to step 2.
Trial 2:
go to Control Panel>Programs and features>select [Microsoft Visual studio 2015]>rightclick>[change]
On the screeen that appears on the window hit "Repair"
After the repair is complete. I repeated step a and this time I hit "modify" button. selected the "Python tools for Visual studio" and moved forward with "install/next" etc.
It worked out.I think only step 2 is good enough to set things right.I am not sure if Trial 1 did any good or not.
Thanks.

Resources