Pre-requisites

Running NPanday's Maven plugins requires the following on your system:

  • Maven 2.0.9 or above (see Maven's download page for instructions).
  • Java Development Kit (JDK) 1.6 or greater ( Java SE Downloads). Also, the JAVA_HOME environment variable must be set to the directory where the JDK is installed, for example, C:\Program Files\Java\jdk1.6.0. The java executable must also be available on your path.
  • Visual Studio 2005 (SP1) or the .NET 2.0 SDK for developing .NET 2.0 applications and libraries (.NET 2.0 SDK: x86, x64)
  • Visual Studio 2008 (SP1) or the Microsoft Windows SDK for Windows 7 and .NET 3.5 SP1 for developing .NET 3.5 applications and libraries. Note: The SDK can be installed on XP or Vista, too.
  • Visual Studio 2010 (SP1) or the Microsoft Windows SDK for Windows 7 and .NET 4 SP1 for developing .NET 4 applications and libraries. Note: The SDK can be installed on XP or Vista, too.
  • NUnit in order to run unit tests with NPanday. Make sure the bin directory is on the PATH.

If you later have problems relating to being unable to find the SDK, refer to the Troubleshooting section.

Removing a Previous Version

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.

Obtaining NPanday

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.

Installing Using the Downloaded Binary Repository

In this guide, we will use the repository downloaded from the NPanday download page.

Installing NPanday's Maven Plugins

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.4.0-incubating\npanday-project-1.4.0-incubating.pom.

To confirm your installation, run the following command, replacing 1.4.0-incubating with the version you are installing:

mvn help:describe -DgroupId=org.apache.npanday.plugins -DartifactId=maven-vsinstaller-plugin -Dversion=1.4.0-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: org.apache.npanday.plugins
Artifact Id: maven-vsinstaller-plugin
Version: 1.4.0-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 NPanday's Maven extensions.

Installing the Visual Studio Add-in

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>.

mvn org.apache.npanday.plugins:maven-vsinstaller-plugin:[version]:install

You can also specify the location where you want the libraries to be copied by running the following command:

mvn org.apache.npanday.plugins: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.

Installing the Visual Studio Add-in using the NPanday Installer

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.

Verifying the NPanday Add-in

To verify that the NPanday .NET Build Tool has been configured inside Visual Studio, perform the following instructions:

  1. Launch Visual Studio (either from the command line or from the Windows Start> menu).
  2. From inside Visual Studio, select Tools>NPanday Build System. This automatically starts NPanday and displays a confirmation in the Visual Studio Output window at the bottom of the Visual Studio screen.
NPanday Build System

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.

Getting Started with the Visual Studio Add-in

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.