Cannot create Multi-Device Hybrid App project - visual-studio-2013

I've installed the Multi-Device Hybrid Apps for Visual Studio 2013 CTP 2.0, however I can not create a project, as I get the following message:
This project cannot be created because Node.js could not be found.
I already had Node.js installed under C:\Program Files (x86)\nodejs\node.exe before I installed this extension.
Where can I set the path so that this extensions finds Node.js? I cannot see anything under Tools -> Options -> Multi-Device Hybrid Apps.
EDIT:
C:\Program Files (x86)\nodejs is in my System Path variable.
I'm running Visual Studio 2013 as Administrator.

Fixed. The solution to this problem was to un-install Nodejs, then re-run the Multi-Device Hybrid Apps extension installation.

Wayne,
Could you check if your node install folder is in your system Path? If not, please add C:\Program Files (x86)\nodejs\ to the path and try creating your project again.
We add the node folder to your path when you install node through our installer. Since you already had node installed, did you uncheck the "Joyent Node.js" option while installing our tools? This might have led to the folder not being added to the path.
Let us know if that unblocks you.
EDIT
A couple more things
In the registry HKCU\Software\Node.js, there should be a registry value "InstallPath". Could you check if that value exists and points to an existing folder on disk and that the folder contains Node.exe?
Does the nodejs folder under program files contain the node.exe file?
Thanks!
-Avani

Related

Nuget Restore in a Docker Container

I am trying run nuget restore mySolution.sln in a docker container.
For the most part it seems to work just fine. The packages seem to restore fine, but before they do, it shows this error:
C:\src\myProject\mySolution.csproj(317,11):
error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found.
Also, tried to find "WebApplications\Microsoft.WebApplication.targets" in the fallback search path(s) for $(VSToolsPath)
- "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0" .
These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin\msbuild.exe.Config". Confirm that the path in the declaration is correct, and that the file exists on disk in one of the search paths.
From what I read, this means I need the nuget package MSBuild.Microsoft.VisualStudio.Web.targets. I did a nuget install of that, but the error does not go away. (It just drops it where ever I run it. I tried putting it with my solution and in the packages folder. Neither had any effect.)
How can I fix this error using command line tools? (No GUI because this is a docker container).
I assume what you're trying to build is a web-application, but you haven't installed corresponding workloads in your build tools package.And that's the cause of this issue. (Agree with imps)
Open the Visual Studio Installer in Start menu and you can modify the workloads of your msbuild package:
I only use the msbuild build tools package to build C++ desktop projects in server, so I only install the Visual C++ build tools workload. For you, you have to install the build tools for Web applications so that you can get the necessary files to build web-applications.
Update:
error: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found.
After I install the Web development build tools, I now get the newly created WebApplications folder in path C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0.

How to install vstest.console.exe offline

I am supposed to do an offline installation of vstest.console.exe in the folder path as follows: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow
I have tried using offline packages such as vs_testagent.exe and vs_testcontroller.exe according to the following link: https://learn.microsoft.com/en-us/visualstudio/install/create-a-network-installation-of-visual-studio. However, these packages do not contain vstest.console.exe.
I am also unable to do a full installation of VS2017 due to space issues. Do anyone have any suggestions? Thanks.
Download the nuget package: Microsoft.TestPlatform, rename it a zip file. Open the zip file, you will find all you need from this folder: .\tools\net451\Common7\IDE\Extensions\TestPlatform, including vstest.console.exe, testhost.**.exe, QTAgent.exe, datacollector.exe.
If you added the nuget package to project, it just downloads the package to packages folder and won't complie to bin, so you have to add a Post-Build event to copy files to bin folder from the packages folder.
You are looking for "Build Tools for Visual Studio" (Microsoft login required). It will give you an installer "vs_BuildTools.exe", which will install by default the build tools in:
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools
(by default)
Two versions of vstest console were installed when I ran it:
...\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe
...\Common7\IDE\Extensions\TestPlatform\vstest.console.exe
I do not know why, nor how they are different. I use the first one.
I used the chocolatey package visualstudio2019testagent to install VS 2019 Test Agent.
Not sure if this would help someone in the future.
Download the Visual Studio Build Tools installer from https://my.visualstudio.com/Downloads?q=build%20tools%20for%20visual%20studio
Run the installer, click the tab Individual components and select Testing tool core features - Build Tools
After installation the vstest.console.exe is located in folder
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\TestWindow

How to find Android sdkmanager installed path in Windows with Visual Studio 2017

We are using Visual Studio 2017 (15.7.4 update) with Windows OS. We are facing issue on Android SDK manager installed path. Can you please suggest idea to get Android SDK manager installed path based on registry or command line?
Regards,
Dheepa
It should be in: C:\Program Files (x86)\Android unless you set a particular path. You won't have any key on the registry since it a folder from which VS (or any other IDE) "uses" the Android SDK. You can give it a try checking in your Environment Variables if there is any path referring to the Android SDK, otherwise simply redownload the zip.
To work with Android Visual Studio installs openJDK in
C:\Program Files\Android\jdk
and Android SDK at
C:\Program Files (x86)\Android\android-sdk
You can find sdkmanager.bat at
C:\Program Files (x86)\Android\android-sdk\tools\bin
It is recommended to add the bin directory to the system path.

Where is Microsoft.Web.Publishing.targets?

My MSBuild proj file is referencing Microsoft.Web.Publishing.targets. Even though microsoft says MSBuild is standalone installation, i dont think this file is part of MSBuild.
I am trying to setup a build server. and i don't see this file at this location. We have installed .Net 4.5.2 installed on that server.
C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\vXX.X\Web\Microsoft.Web.Publishing.targets
After researching I found, I have to install VisualStudio to get this at that location.
Questions
Is there any way to install this Target (and other Targets at this location) without having to install visual studio?
Yes, you can use the MSBuild.Microsoft.VisualStudio.Web.targets package.

Visual Studio Code install location

I installed Visual Studio Code a few days ago, and now I can't find the executable on my machine. Where is it?
I have checked Programs and Features. I have also checked my PATH. For some reason it isn't in either.
Update 10.11.2018
If you do a complete re-install, including uninstalling prior versions of code installed on your machine the new version will be installed at
C:\Users\{UserName}\AppData\Local\Programs\Microsoft VS Code
Update 06.07.2018
Since Version 1.25 VS Code supports portable mode.
Instructions on how to use this are documented here.
You will need the ZIP file download version - not the installer.
After unzipping the contents of the archive, create a data folder inside the folder, where code.exe is located. All settings will now be saved there and can be brought along with you.
|- VSCode-win32-x64-1.25.0-insider
| |- Code.exe (or code executable)
| |- data
| |- ...
On macOS, the folder must be named code-portable-data and has to be a sibling of the app itself. Not inside the app.
|- Visual Studio Code.app
|- code-portable-data
The reasoning behind this can be read here: What is VSCode User Setup for Windows?
Update
If you are using the x64 version, the path is:
C:\Program Files\Microsoft VS Code\
C:\Program Files\Microsoft VS Code\Code.exe
Original answer
At this point and time (Version 1.19.2) Vs code no longer resides in your AppData folder, but under
C:\Program Files (x86)\Microsoft VS Code\
C:\Program Files (x86)\Microsoft VS Code\Code.exe
There are two types of installer available for VSCode.
Go to link to find type of installer you want.
If you are using/going for User Installer, the version will be installed at:
C:\Users\{UserName}\AppData\Local\Programs\Microsoft VS Code
If you are using/going for 64bit System installer, the version will be installed at:
C:\Program Files\Microsoft VS Code\
If you are using/going for 32bit System installer, the version will be installed at:
C:\Program Files (x86)\Microsoft VS Code\
I used the new VSCode User Setup installer on Windows 10, and found the executable here:
C:\Users\my-username\AppData\Local\Programs\Microsoft VS Code\
Okay. I found it in the docs.
C:\Users\my.user\AppData\Local\Code\app-0.1.0
The way I find most intuitive and easy to remember is:
Search for Visual Studio Code in the Windows 10 search bar -> right-click -> Open File Location
For me this goes directly to:
C:\Users\{YOUR_NAME}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Visual Studio Code
Right-click on the shortcut -> Properties -> Start in:
"C:\Users\{YOUR_NAME}\AppData\Local\Programs\Microsoft VS Code"
If you prefer username-agnostic path strings:
folder: %HOMEPATH%\AppData\Local\Programs\Microsoft VS Code\
executable: %HOMEPATH%\AppData\Local\Programs\Microsoft VS Code\bin\code
If you also want to use those path strings inside C#/C++ code:
folder: "\"%HOMEPATH%\\AppData\\Local\\Programs\\Microsoft VS Code\\\""
executable: "\"%HOMEPATH%\\AppData\\Local\\Programs\\Microsoft VS Code\\bin\\code\""
If for some reason none of the other answers work, try this:
Go into your vscode settings
Find any setting that has 'Edit in settings.json' (for example - Color Customizations)
Press ctrl+shift+s
Go one folder up
Copy + paste the file location (on the top for windows) into into another file explorer
Profit
The difference is:
System Installer will install VSC in C:\Program Files\Microsoft VS Code\
User Installer will install VSC in %HOMEPATH%\AppData\Local\Programs\Microsoft VS Code\
Search for the files with respect the version installed.
Why default your program would be installed here..
C:\Program Files\Microsoft VS Code\
If you have chosen different directory while installing it you can get it by:
1. Go to the icon location
2. Right click open properties
3. Check target
I found it at
C:\Users\%username%\source\repos\Notes\%VSCode-folder%\bin\Debug\
Where %username% is the user and %VSCode-folder% is the VSCode project

Resources