DeepSpace101
DeepSpace101

Reputation: 13722

TFSPreview build server can't build NUnit test project due to missing 'NUnit' namespace

The setup: TFSPreview.com (MS Team Fortress in Cloud) for

VS 2012 Solution

  1. WCF service project
  2. test WCF service project (NUnit based)
  3. Azure Cloud project (only covers #1 above)

Problem: Build fails because stats.cs (7): The type or namespace name 'NUnit' could not be found (are you missing a using directive or an assembly reference?)

stats.cs line #7 is using NUnit.Framework;

the nunit .dll is at <test project>\lib\nunit.framework.dll and in solution explorer when I go to the test project -> references -> nunit.framework -> properties, Copy Local is already true (so it should manually copy over the .dll to azure for deployment)

Does anyone have an idea what might be wrong here?

Upvotes: 0

Views: 486

Answers (1)

DeepSpace101
DeepSpace101

Reputation: 13722

Doh! This was a super simple fix. Although it was compiling locally it wasn't compiling on the build/TFS server because the <test project>\lib\ folder wasn't checked into TFS !! So the Copy Local = true didn't matter since it's a deployment stage setting and we're failing earlier at the compile stage itself! Posting back incase it helps someone else ...

Upvotes: 1

Related Questions