Why does the code . shortcut not work on OSX? - macos

I've tried adding the 'code .' shortcut to launch your current directory in Terminal in Visual Studio Code, but I was promptly returned the following error:
LSGetApplicationForInfo() failed with error -10814 while trying to
determine the application with bundle identifier com.microsoft.VSCode.
Visual Studio Code is installed on my machine successfully.
I'm using OSX Yosemite 10.10.3.
Does anybody know how to get this shortcut to work correctly?

Make sure you have Visual Studio Code 0.3.0 installed. We recently changed the bundle identifier!

This error is because Finder cannot locate Visual Studio Code. I can reproduce the same error on my machine by deleting Visual Studio Code.
Try re-installing VS Code to /Applications and restarting Terminal.

Press command + shift + p
Type: Install 'code' command in path
Choose the option

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.

Unable to launch DAML studio

On MacOs, when I try to launch daml studio from command line, I receive several errors and it doesn't launch.
I have gone through all the installation requirements for DAML including installing Visual Studio Code which runs successfully on my Mac as well as the latest Java SDK. I went through the quickstart and DAML successfully works on my system using the IOU on http://localhost:4000. I updated %PATH correctly and have gone through the instructions twice to make sure I'm not missing anything.
Here is what I launch and the results that it is providing...
MacBook-Pro-2:quickstart aron.elston$ daml studio
/bin/sh: code: command not found
Failed to install DAML Studio extension from marketplace.
Installing bundled DAML Studio extension instead.
/bin/sh: code: command not found
Failed to install DAML Studio extension from SDK bundle.
Please open an issue on GitHub with the above message.
https://github.com/digital-asset/daml/issues/new?template=bug_report.md
/bin/sh: code: command not found
Failed to launch DAML studio. Make sure Visual Studio Code is installed.
See https://code.visualstudio.com/Download for installation instructions.
MacBook-Pro-2:quickstart aron.elston$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/aron.elston/.daml/bin
MacBook-Pro-2:quickstart aron.elston$ pwd
/Users/aron.elston/.daml/bin/quickstart
MacBook-Pro-2:quickstart aron.elston$
I would expect it to open the project in Visual Studio Code but instead I get errors as shown above.
Looks like the code command to launch VS code isn't available on the command line. That should be fixable by following the instructions here: https://code.visualstudio.com/docs/setup/mac#_launching-from-the-command-line

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

Visual Studio 2005: "Error: the Visual C++ Project Engine is not properly installed."

My VS2005 started printing the following error:
Error: the Visual C++ Project Engine is not properly installed. The build cannot continue. Please repair the Visual Studio installation.
What do I do now? Is there a way to fix this that does not require reinstalling the application?
I was able to solve this by following this procedure:
locate this file "VCProjectEngine.dll" (vc/vcpackages)
re-register it by running this command on the shell ( the command window):
regsvr32 VCProjectEngine.dll

Resources