To build NTVS on your own PC, for example to pick up the latest bug fixes, make modifications, or contribute back to the project, please use the following instructions.

Cloning

First, you will require a local copy of our Git repository. It can be cloned from https://git01.codeplex.com/nodejstools.

If you do not want to use Git, you can download the latest commit as a ZIP file from the Source Code page.

If you intend to contribute back to NTVS, you will need to Create a Fork and use the source URL provided there.

Prerequisites

The following list of software is required in order to build NTVS from source. All of these are required for a complete build, though a complete build is not required to be able to contribute. The next section outlines the projects that may be omitted when building NTVS.

Note that you do not need both Microsoft Visual Studio 2010 and 2012. You'll need VS 2012 to build NTVS for VS 2012, and VS 2013 to build NTVS for VS 2013. Instructions in this document describe how to build using VS 2012 -- building with VS 2010 is very similar.

Software

Download

Microsoft Visual Studio 2010/2012/2013 Professional or higher

Free trials: http://www.microsoft.com/visualstudio/eng/downloads

Microsoft Visual Studio SDK

VS 2013: http://www.microsoft.com/visualstudio/eng/downloads#d-vs-sdk
VS 2012: http://www.microsoft.com/en-us/download/details.aspx?id=30668
VS 2010: http://www.microsoft.com/en-us/download/details.aspx?id=21835

msysgit

http://code.google.com/p/msysgit/ (Git client)

Some other prerequisites are included with the source code:

Our automated tests use a separately installed tool for controlling Visual Studio. These can be installed by running Prerequisites\TCTestHostAdaptersDev12.msi for VS 2013, Prerequisites\TCTestHostAdaptersDev11.msi for VS 2012 or Prerequisites\TCTestHostAdaptersDev10.msi for VS 2010.

Finally you'll need to disable strong name verification for the Node.js Tools binaries. This can be done by merging the Prerequisites\EnableSkipVerification.reg file (or Prerequisites\EnableSkipVerificationX86.reg, depending on your own system).  This will install registry keys which disable strong name verification for the assemblies built by NTVS.  If you also want to use the installer you may need to stop and restart the Windows Installer service (from an elevated command prompt, type net stop "Windows Installer" and then net start "Windows Installer").

Building with MSBuild

NTVS can be built from the Visual Studio Command Prompt by typing

msbuild NodejsTools.sln

in your cloned directory. This will install NTVS into the VS Experimental hive, but does not create an installer or affect your main VS installation. Building should complete with zero warnings or errors.

To build using the Release configuration, which produces optimized code, type:

msbuild NodejsTools.sln /p:Configuration=Release

in the cloned directory. As above, this does not create an .msi file, but it will install NTVS into the VS Experimental hive.

The VS Experimental hive can be started from the Start menu or by typing

devenv /rootSuffix Exp

at the Visual Studio Command Prompt.

Building with Visual Studio

NodejsTools.sln can be opened and built in Visual Studio using the Build Solution command. To debug, ensure that NodejsTools is selected as the startup project and use F5 to run NTVS inside of the VS Experimental hive. If an error appears rather than a new instance of VS, ensure the Project|Debug settings are correct.

Building in Visual Studio may produce a number of warnings related to potentially incompatible assemblies and missing references. As long as all projects build successfully, these warnings are benign and can be ignored.

If you already have NTVS installed for all users then you will get an error while compiling. The solution is to uninstall NTVS, or to reinstall it for the current user only. To install for the current user, install from the command line using msiexec /i NodejsToolsInstaller.msi ALLUSERS="".

Last edited Nov 20, 2013 at 10:24 PM by dinov, version 4

Comments

Birbilis Thu at 3:48 PM 
btw, msysgit URL is http://msysgit.github.io/, not http://code.google.com/p/msysgit/ anymore

Birbilis Thu at 3:47 PM 
for Git client also see https://code.google.com/p/tortoisegit/

sedouard Jun 27, 2014 at 10:49 PM 
I built the solution but I noticed running in experimental mode hit an error where Microsoft.NodejsTools.targets wasn't sitting in the right place. I copied it from the build output to the expected location in the error message and it works now. Just a heads up.

mlekomleko Feb 27, 2014 at 7:02 PM 
how into building installer?