I'm setting up a project in which I want to include a unit test project for testing. I'm testing this with the new TFS Online preview (dev 11), so I want to use a continuous build to test each check-in.

I've created some simple unit tests to try this out, which open up a SPSite and passes that along to some business logic methods (like the interface would do). These tests work ok in Visual Studio (I've set the config to .NET 3.5 and x64). But when handled by the Build Controller (which is the same server, same environment), I get a FileNotFoundException telling me there is no site on that address. That's quite a common error caused by either not running x64 or invalid credentials. I've made sure the build server runs as an account which has valid credentials on the site, so I think it's a x86 / x64 issue of some sort.

Anyone has any experience with this? Is it supported at all?


1 Answer 1


I followed the steps in this blog - http://www.sharepointnutsandbolts.com/2012/04/sharepoint-2010-and-unit-tests-from.html, except it worked for me without step 1 (changes to devenv.exe.config)

Basically, make sure the project targets 3.5, use "Any CPU", and make sure the .testsettings files are set to use 64 bit.

The blog says it is NOT supported through TFS though.

  • Hmmm no support then, that's too bad.
    – Jasper
    Oct 9, 2012 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.