How do I install Microsoft.Activities.UnitTesting?

Microsoft.Activities.UnitTesting is built for .NET 4.0.0 and .NET 4.0.1 (and soon .NET 4.5.0)
Which release should I install?

There are two options to install Microsoft.Activities.UnitTesting.

Use Nuget to add it to your project (recommended)


The NuGet install downloads assemblies for .NET 4 and .NET 4.0.1 (Platform Update 1). NuGet will automatically add a reference to the correct version of the assemblies based on the target framework of your project.
The packages are installed in the packages directory under the solution folder. For example, ConsoleApplication3\packages
packagesDir.png

What does the NuGet install do to my project?

  • It adds references to Microsoft.Activities, Microsoft.Activities.UnitTesting and System.Activities
  • It adds (or replaces) toolbox icons for the activities contained in Microsoft.Activities and Microsoft.Activities.UnitTesting
UTToolbox.png

Install with the NuGet Package Manager Console (recommended)

  • Open the Package Manager Console (View / Other Windows / Package Manager Console)
  • Type install-package Microsoft.Activities.UnitTesting
Package Manager Console Host Version 1.4.20701.9038

Type 'get-help NuGet' to see all available NuGet commands.

PM> install-package Microsoft.Activities.UnitTesting
Attempting to resolve dependency 'Microsoft.Activities (≥ 1.8.4)'.
Successfully installed 'Microsoft.Activities 1.8.4.711'.
Successfully installed 'Microsoft.Activities.UnitTesting 1.8.4.711'.
Successfully added 'Microsoft.Activities 1.8.4.711' to ConsoleApplication3.
Successfully added 'Microsoft.Activities.UnitTesting 1.8.4.711' to ConsoleApplication3.

Add Microsoft.Activities.UnitTesting to your project with the NuGet Package Manager

  • Right click on your project
  • Select Manage NuGet packages...
managenuget.png
  • Type Microsoft.Activities in the Search Box
  • Select Microsoft.Activities.UnitTesting and click install - (Microsoft.Activities will also be installed because it is a dependency).

searchbox.png

Download the zip file

  • Go to the wf.codeplex.com Downloads page
  • Download the latest release of Microsoft.Activities.UnitTesting for the Target Framework you want. The default release is for .NET 4. The release with PU1 after the name is for .NET 4.0.1 (Platform Update 1)
DownloadRelease.png
  • Unzip the files and add a reference to Microsoft.Activities.UnitTesting.dll and Microsoft.Activities.dll

Last edited Dec 9, 2011 at 5:06 PM by ronjacobs, version 18

Comments

hardywang Jan 3, 2014 at 6:58 PM 
Got a lot of error to install it via NuGet

PM> install-package Microsoft.Activities.UnitTesting
Attempting to resolve dependency 'Microsoft.Activities.Extensions (= 2.0)'.
Installing 'Microsoft.Activities.Extensions 2.0.6.9'.
Successfully installed 'Microsoft.Activities.Extensions 2.0.6.9'.
Installing 'Microsoft.Activities.UnitTesting 2.0.6.9'.
Successfully installed 'Microsoft.Activities.UnitTesting 2.0.6.9'.
Adding 'Microsoft.Activities.Extensions 2.0.6.9' to WorkflowActivityTest.
Successfully added 'Microsoft.Activities.Extensions 2.0.6.9' to WorkflowActivityTest.
Import-Module : Cannot load Windows PowerShell snap-in C:\temp\WorkflowPoC\packages\Microsoft.Activities.Extensions.2.0.6.9\tools\Microsoft.Activities.Extensions.NuGet.dll because of the f
ollowing error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Loader Exceptions:

Could not load file or assembly 'System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the fil
e specified.
Could not load file or assembly 'System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the fil
e specified.
At C:\temp\WorkflowPoC\packages\Microsoft.Activities.Extensions.2.0.6.9\tools\install.ps1:7 char:14
+ Import-Module <<<< (join-path $toolsPath "Microsoft.Activities.Extensions.NuGet.dll")
+ CategoryInfo : ResourceUnavailable: (:) [Import-Module], PSSnapInException
+ FullyQualifiedErrorId : PSSnapInLoadFailure,Microsoft.PowerShell.Commands.ImportModuleCommand
The term 'Add-ActivityToolbox' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At C:\temp\WorkflowPoC\packages\Microsoft.Activities.Extensions.2.0.6.9\tools\install.ps1:9 char:20
+ Add-ActivityToolbox <<<< -Project $project.Object -Activity "Microsoft.Activities.Extensions.Statements.DelayUntilTime" -Category "Microsoft.Activities.Extensions" -ActivityAssembly "Mi
crosoft.Activities.Extensions" -BitmapID "DelayCheck"
+ CategoryInfo : ObjectNotFound: (Add-ActivityToolbox:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

......
......