Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
Hmmm no support then, that's too bad. –  Jasper Oct 9 '12 at 13:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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