SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying the SharePoint Emulator and wanted to emulate the access to a userprofile. But when trying to get SPServiceContext from an emulated site my SPServiceContext is null.

Any Idea?

share|improve this question
up vote 1 down vote accepted

According to this documentation ServiceContext is not an emulated type. I'd be surprised if they supported anything beyond Site level objects.

share|improve this answer
Ok but that means that many solutiontypes can't be unittested. – Steffen Schindler May 31 '13 at 6:36
If you are only using those tools (and not extending them) then yes, I would agree. But if you think about it, there is a LOT that falls into this category, like Search and MMS solutions. I think you need to look at your testing methods and tools and decide if it's worth your personal investment to develop the testing tools yourself. (Or test in another way.) – Matthew McDermott May 31 '13 at 15:05

Your Answer


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.