Running NPanday's Maven plugins requires the following on your system:
If you later have problems relating to being unable to find the SDK, refer to the Troubleshooting section.
Before installing NPanday, you may need to do some further preparation.
While it is generally safe to install the new version without uninstalling the previous version, to ensure a clean system you may want to follow the Uninstalling NPanday instructions.
All Maven commands must be run with the PATH set for the .NET SDKs. This can usually be achieved by starting the appropriate command prompt shortcuts supplied with the SDK or Visual Studio.
In addition, at present the NPanday Add-in runs Maven directly and so also requires that all the SDKs are already on the path - something which is not usually the case when Visual Studio is run.
The method you use to set the PATH environment can vary, depending on how you usually launch Visual Studio:
The easiest way to obtain the full PATH is to call set path from the Visual Studio Commmand Prompt of the corresponding Visual Studio version. Then use copy-paste to set this PATH permanently to your Environment Variables.
The correct PATH should include the following:
If you are building .NET SDK 3.5 or Visual Studio 2008 projects, you must ensure that the elements for that environment are before any previous SDK versions.
The additional PATH fragment for Visual Studio 2008 will probably look like the following:
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN; C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v3.5; C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 9.0\VC\VCPackages; C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin;
For Visual Studio 2005, it will likely be:
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;C:\Program Files\Microsoft Visual Studio 8\VC\BIN; C:\Program Files\Microsoft Visual Studio 8\Common7\Tools;C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\bin; C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\bin;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin; C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 8\VC\VCPackages;
If you only have a newer version, but no Visual Studio 2005 installed, you need to install .NET 2.0 SDK and add C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 to the PATH.
Add the following to the path:
C:\Windows\Microsoft.NET\Framework\v4.0.30319; C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools;
NPanday releases are made available in two locations:
In NPanday 1.1, the release is only made available as a Maven binary repository, or a source distribution. For information on how to build the project from source, see Building from Source in the Developer's Guide. NPanday 1.2 and above include a Windows installer as an option.
In this guide, we will use the repository downloaded from the NPanday download page.
Whether you are using just the Visual Studio integration or the full set of capabilities, you must have the Maven environment installed.
For the purposes of this guide, we will copy the artifacts to our local environment only - however in most developer groups you will host the repository on a shared server that all developers can use to obtain the correct release.
After downloading the binary repository, unpack the contents (you may need a 3rd party application to expand the tar.gz format on Windows). Next, copy the contents of repository/releases from the archive to %HOMEDRIVE%%HOMEPATH%\.m2\repository. This is the default local repository of a Maven installation if it has not been modified in Maven's settings.xml.
For example, you may end up with a structure containing C:\Documents and Settings\User\.m2\repository\npanday\npanday-project\1.3-incubating\npanday-project-1.3-incubating.pom.
To confirm your installation, run the following command, replacing 1.3-incubating with the version you are installing:
mvn help:describe -DgroupId=npanday.plugin -DartifactId=maven-vsinstaller-plugin -Dversion=1.3-incubating
If successful, you should receive the following output:
Name: NPanday :: Visual Studio Addin Installer Maven Plugin Description: Maven Plugin for .NET: Installs the Visual Studio Addin Group Id: npanday.plugin Artifact Id: maven-vsinstaller-plugin Version: 1.3-incubating Goal Prefix: vsinstaller This plugin has 1 goal: vsinstaller:install Description: Installs Visual Studio 2005 addin.
If you don't intend to use the Visual Studio Add-in, you can now get started using Maven.
To install the Add-in, first ensure that Visual Studio is not running.
Next, from a command prompt with the path set as indicated above, run the following command. This command will generate the addin and copies the necessary libraries needed to run the addin to a default location C:\[PROGRAMFILES]\NPanday>.
You can also specify the location where you want the libraries to be copied by running the following command:
mvn npanday.plugin:maven-vsinstaller-plugin:[version]:install -DinstallationLocation=url
Note: On Windows Vista, Windows 7 and above, you will need to run the command as an administrator. This can be done by starting the command prompt using the Run as administrator option.
After running the maven-vsinstaller-plugin the add-in will be located here: C:\Documents and Settings\[user_home]\My Documents\Visual Studio 2005\Addins\NPanday.VisualStudio.AddIn (or equivalent for Visual Studio 2008 or Visual Studio 2010).
More information on how to verify the Add-in installation are located at the end of this guide.
NPanday Installer allows user to use NPanday automatically without the hassle of downloading the repository and running commands to install it. It will generate the repository and the add-ins for both VS2005 and VS2008.
To launch the NPanday Setup, click the installer twice,
After clicking the 'Next' button, End-User License Agreement wizard page will prompt. Check the box and click the 'Next' button.
Next wizard page will be for the Custom Setup which will allow user to change the way the features will be installed and the location of the repository.
If you are going to configure Maven to use NPanday installed on a remote repository, you can disable the installation of its artifacts in your local repository.
An item for the Visual Studio Addin should appear for each version of Visual Studio that you have installed. You can then select which of these you wish for the Addin to be installed into.
After changes were made, click on Next button and user will be redirected to the Installation wizard page. Click on the 'Install' button to start installation.
If installation was successful, user will be prompted with this:
After running the installer the add-in will be located here: C:\Documents and Settings\[user_home]\My Documents\Visual Studio 2005\Addins\NPanday.VisualStudio.AddIn (or equivalent for Visual Studio 2008 or equivalent for Visual Studio 2010).
You can verify that the Maven plugins are also installed correctly by following the same steps as shown in the previous section.
To verify that the NPanday .NET Build Tool has been configured inside Visual Studio, perform the following instructions:
You can also set Visual Studio to automatically start NPanday Build System upon startup by checking NPanday.VisualStudio.Addin in Tools > Add-in Manager.
After it starts, you will not see NPanday Build System listed in the Tools menu, until the next time you start Visual Studio.
You can now start Visual Studio and test the Add-in. The next section of this guide will focus on using the Visual Studio Add-in.