Visual studio does not install .vsix files - visual-studio

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

Related

Visual Studio 2022: System.InvalidOperationException: "git" is not present in PATH

I'm trying to compile the following project:
https://github.com/xoofx/markdig
In Visual Studio 2022, How to resolve the error message:
System.InvalidOperationException: "git" is not present in PATH.
What's the correctly way to install 'git' for visual studio? I thought Visual Studio Already has git installed out of the box, judging by the label "Git" on the menu bar.
Here's a picture of my screen:
Menu: Tools->Command-Line:
Thanks for adding the picture. You need to have git installed. This can be done independently or through visual studio installer.
https://git-scm.com/downloads
It will ask you during installation if you want it to be added to the path - choose yes.
Once you have installed, launch the command window from start menu
and run git command. That should show something like this -
[2]
Once you have git command running from command line it should work from visual studio as well. Essentially VS is trying to launch that command from its shell and failing to find it because you dont have git installed.
VS does come with git installed but you have to choose it in its workloads. You have to go through all available installation options. See the screenshot below from VS 2017 installation workload. You can do this by re-launching your VS installer and selecting the products that you want installed. Since I use most of the things, I dont uncheck anything but that takes close to 50Gig space on the disk - something you want to be aware of.

How do I fix visual studio installer (2019 community) is empty?

I downloaded the visual studio 2019 community installer and ran it. It ran successfully but instead of opening the visual studio installer when it completed it just closed. I located the visual studio installer 'setup.exe' (under C:/Program Files (x86)/Microsoft Visual Studio/Installer) and ran it. It opens the installer but instead of allowing me to select tools to install it just has 2 empty tabs labeled 'installed' and 'available' and a side bar that shows developer news.
I don't have any antivirus or firewall running. I uninstalled every version of visual studio I had in case the installer was assuming I already have VS2019. I updated windows and my drivers.
EDIT:
I had a hunch that I might find something out by using 'setup -h' in command prompt. It appears that it may be possible to install vs2019 by using the right tags.
I guessed
setup install --productid Microsoft.VisualStudio.Product.Community --channelid VisualStudio.15.Release
might work but the installer says "
A product matching the following parameters cannot be found:
channelId: VisualStudio.15.Release
productId: Microsoft.VisualStudio.Product.Community
"
If you know what the right tags are that might be an adequate solution.
Please try to reinstall it:
1) run cmd as Administrator and then type:
"%programfiles(x86)%\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe" -full
2) restart vs_installer again.

I Have Problem Installing Extensions For Visual Sudio 2019

I Have A Problem And That Is :
I've Tried To Install An Extension From Visual Studio 2019 Extension Manager's MarketPlace
e.g (CodeMaid)
So I've Clicked And Downloaded It , When I've Restarted Visual Sudio To Install That Extension But Installer Said : The Install Of "CodeMaid" Extension For Visual Studio Was Not Successful for All the selected products.For More Information Click On The Install Log Link at the bottom of the dialog.]
Note That I Have Installed My Visual Studio In My H: Drive.
Please Help Me :(
I've Tried Any Extension To Install But They All NOT Installed Successfully e.g I Tried To Install Resharper But The Resharper Can't Detect My Visual Studio
(Sorry for My Bad English)
I Have The Screenshot Here:
Click Here To Open Image
You can install extension with .vsix file. Firstly, go to https://open-vsx.org/ and download the extension that you want.After downloading you will get VSIX file.Final step: open visual studio and go to EXTENSIONS.Click option icon(•••) and find and click (install from VSIX) and then choose your downloaded .vsix file. Done.
I've Tried Any Extension To Install But They All NOT Installed
Successfully e.g I Tried To Install Resharper But The Resharper Can't
Detect My Visual Studio
Please try these steps to troubleshoot your issue:
1) delete all vs componment caches under C:\Users\user\AppData\Local\Microsoft\VisualStudio\16.0_xxxxx\ComponentModelCache and do not forget to delete all the files under C:\Users\user\AppData\Local\Temp
2) disable any third party extensions under Extensions-->Manage Extensions to prevent any other extensions affect it.
3) run VS as administrator and then install the extension again.
4) do a repair in VS Installer
5) If your VS2019 is not the latest version, please update it to the latest version and please update your OS at the same time.
In addition, if all the steps does not work, l suggest you chould reinstall VS2019 and you would better install VS2019 on the default system disk. And there is a similar issue.
After you uninstall VS2019, please check if you have this:%programfiles(x86)%\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe.
If so, please launch it from an admin command prompt with a -full param: InstallCleanup.exe -full
If not, please manually delete the %programfiles(x86)%\Microsoft Visual Studio\Installer folder
Then relaunch vs_enterprise.exe and then install VS2019.

Visual Studio 2017 RC installation failure "product ... cannot be found"

I am trying to install Visual Studio Professional 2017 RC on Windows 10 but the installer reports:
A product matching the following parameters cannot be found:
channelId: VisualStudio.15.Release
productId: Microsoft.VisualStudio.Product.Professional
Is this fixable?
I had the same issue and the following has helped me. A clean-up and removal of vs and installation folder was not enough in my case.
Here are the steps I've taken:
uninstalled Visual Studio (and other Visual Studio installations)
run C:\Program Files (x86)\Microsoft Visual Studio\Installer\InstallCleanup.exe -full"
removed all the "C:\Program Files (x86)\Microsoft Visual Studio" folders
removed "C:\Program Data\Microsoft\Visual Studio\ folder
restarted system
In the end I think removing of Program Data location did the final trick. I had to run a repair after the successful installation to make VS Extensions work.
I previously installed VS 15 Release and removed it. I had the same issue and fixed it by removing installer folder from here: C:\Program Files (x86)\Microsoft Visual Studio\ Installer
Please follow the cleanup steps and retry your VS install
See if you have this file on your machine: "%programfiles(x86)%\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe"
If so, please launch it from an admin command prompt with a -full param:
InstallCleanup.exe -full
If not, please manually delete the "%programfiles(x86)%\Microsoft Visual Studio\Installer” folder
Relaunch the newly downloaded vs_enterprise.exe (or vs_professional.exe or vs_community.exe…)
Allow the first step to install the installer
Once the installer comes up and you can see workload choices (.net desktop and the like), close it
Go launch the same InstallCleanup.exe to clean up old build of VS
Then relaunch vs_enterprise.exe and install VS.
The problem that I had was because I had a Visual Studio 2017 layout and I wanted to make a Visual Studio 2019 layout in the same directory.
If you are creating a new offline installation layout on top of an old offline installation layout, you need to delete every file inside the layout folder (And only the layout folder not sub-directories).
This way the new (channel) information will be replaced and installation goes without errors.

Where is Developer Command Prompt for VS2013?

I need to run web.exe file from my developer command prompt in Visual Studio 2013. By default, the command prompt is not installed in Visual Studio 2013.
Previously, I was using Visual Studio 2012. It had developer command prompt installed by default.
Does anyone know why VS2013 doesn't have developer command prompt by default? How can I setup developer command prompt for VS2013?
For some reason, it doesn't properly add an icon when running Windows 8+. Here's how I solved it:
Using Windows Explorer, navigate to:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2013
In that folder, you'll see a shortcut named Visual Studio Tools that maps to (assuming default installation):
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts
Double-click the shortcut (or go to the folder above).
From that folder, copy the shortcut named Developer Command Prompt for VS2013 (and any others you find useful) to the first directory (for the Start Menu). You'll likely be prompted for administrative access (do so).
Once you've done that, you'll now have an icon available for the 2013 command prompt.
From VS2013 Menu Select "Tools", then Select "External Tools". Enter as below:
Title: "VS2013 Native Tools-Command Prompt" would be good
Command: C:\Windows\System32\cmd.exe
Arguments: /k "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat"
Initial Directory: Select as suits your needs.
Click OK.
Now you have command prompt access under the Tools Menu.
I used a modified version of this answer - based on my experiences adding it to VS 2010:
Select Tools >> External Tools in Visual Studio
Click Add
Title: I use Visual Studio Command &Prompt
&P Makes P a alt-shortcut key (when menu active)
I originally used C, but that conflicts with the existing shortcut for Customize
Command: C:\Windows\System32\cmd.exe
Arguments: \k "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\vsvars32.bat
/k keeps a secondary session active so the window doesn’t close on the .bat file
Initial Directory: I use $(ProjectDir) (from the dropdown)
Click OK.
Now you have command prompt access under the Tools Menu.
See also: Add command prompt to Visual C# Express 2010
You can simply go to Menu > All Programs > Visual Studio 2013. Select the folder link "Visual Studio Tools". This will open the folder. There is bunch of shortcuts for command prompt which you can use. They worked perfectly for me.
I think the trick here might be there are different versions for different processors, hence they put them all together.
I don't know if this changed recently -- the answer given by Samuel did not apply to me even though that link seemed authoritative.
A couple of things
1) For some reason, the folder in the start menu is called Visual Studio 2013, and not Microsoft Visual Studio 2013. Using the win8 apps interface you might see the 2010 entry Microsoft Visual Studio 2010, and since you don't see the new 2013 folder Microsoft Visual Studio 2013 next to it, you assume it isn't there. But it is.. Just a few page scrolls away..
2) It seems the Windows 8 (or 8.1 at least) cannot display sub-folders. I tried creating a folder underneath the Visual Studio 2013 folder with shortcuts, and the entire folder just didn't show.
3) Which is why what is installed is a shortcut. Not sure what the windows 7 behavior is with a shortcut in the start menu, but the apps menu just displays it like a folder. When you click on it, it brings you to the so-called missing shortcuts in explorer.
Final solution: under C:\ProgramData\Microsoft\Windows\Start Menu\Programs, create a new folder called Microsoft Visual Studio 2013. Copy the shortcuts from C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts to that new folder. Then you'll have your icons using the windows 8 app interface under the heading which is the new folder name.
You'll also be able to just start typing from the start screen VS2013, and the icons will now show up.
Since any solution given so far will open the command prompt on the project folder, you would still have to navigate to the project's folder. If you are interested in getting the command prompt directly into the project's folder, here is my 2 steps:
Right-click in solution explorer on the project name (just under
the solution name) and choose the command "Open Folder in File
Explorer"
Once the Windows Explorer is open, just type in the
address bar "cmd" and then hit enter!
Et voila! Hope that helps
Visual studio command prompt is nothing but the regular command prompt where few environment variables are set by default. This variables are set in the batch script : C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat . So basically to get a visual studio command prompt for a particular version, just open regular command prompt and run this batch script : C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat (Change the visual studio version based on your installed version). Voila you have got the visual studio command prompt. You can write a script to run the batch file and open cmd.exe.
Works with VS 2017
I did installed Visual Studio Command Prompt (devCmd) extension tool.
You can download it here: https://marketplace.visualstudio.com/items?itemName=ShemeerNS.VisualStudioCommandPromptdevCmd#review-details
Double click on the file, make sure IDE is closed during installation. Open visual studio and Run Developer Command Prompt from VS2017
I'm using VS 2012, so I navigated to "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Visual Studio 2012\Visual Studio Tools" and ran as administrator this "Developer Command Prompt for VS2012" shortcut. In command shell I pasted the suggested
aspnet_regiis -i
and as I suspected this did not yield any success on Windows 10:
So all I needed to do was "Turn Windows Features On/Off" at Control Panel and restart my machine to effect the changes. That did resolve the issue. Thanks.

Resources