Manually building Pex Extensions

This page details how you can manually build the Pex Extensions. The Pex extensions allows other unit testing framework syntax, apart from MSTest, to be used when Pex generates the code.

On the releases tab of the project, you will find zip files containing the extension assembly for a particular framework, built against the latest version, together with the framework we built against. However the extensions are built against a particular version of Pex and a particular version of the unit testing framework.

Building against an older version of the Unit Testing Framework

While the downloads on the releases tab are built against the latest version of the framework, your unit testing project might be using an older version. If this is the case, you have two choices. One choice is to upgrade your test project to the latest version of the framework which matches the version the extension was built against. The second choice is to manually build the extensions against the older version of the framework, which I have detailed below.
  1. Download the zip file containing latest source code from the Source Code tab
  2. Extract the zip into a directory. The root directory will contain three subdirectories, Build, External and Sources.
  3. The External directory contains all the assemblies of the unit testing framework which we build against, for example NUnit 2.4.8. Simply replace these assemblies with the version you wish to build against, such as NUnit 2.4.2. When we build the extensions, we will pickup the external dependencies from this directory. Note, we will be build against the latest version of Pex you have installed.
  4. Next, you need to build the extensions using MSBuild. Within the Sources directory, you will find the Pex.msbuild script you should use. The command is 'msbuild Pex.msbuild /p:PexVersion=0.6.30728.0'. The PexVersion property should be the version of Pex you are building against, however this is not essential.
  5. After the build has completed successfully, a Zips directory would have been created the in root directory. Inside this directory there will be four zips, one for each extension.
  6. Simply extract the extension assembly from the zip into your directory and begin to use this.
  7. If the build fails, you will need to open the pex.extensions.sln and manually fix the build.

Last edited Aug 31, 2008 at 9:14 PM by ben2004uk, version 2


No comments yet.