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 have content types and related lists (via lookup columns) in a Sandbox solution(.wsp). All my lookup column relationships come up fine in the SPMetal generated entity classes.

I now have a requirement to change the solution from Sandbox to Farm scope. However, once I change the solution from Sandbox to Farm scope and deploy it, and then run SPMetal on my lists, it no longer generates navigation properties for my lookup columns. They just have a property for the Id of the lookup column and not the actual object.

Can anyone shed some light on why SPMetal ignores my lookup columns when the .wsp is changed from Sandbox to Farm scope?

share|improve this question
Here is a probably answer a link! – trip Jun 2 '11 at 13:14
what does your spmetal xml look like? – mcnarya Sep 30 '11 at 18:21
maybe not very constructive, but do the same as I did. Stop using SPMetal. It's behavior is too unclear and random, even when you write carefully your xml file. And the lot of limitations, hard to workaround for most, are counter-productive on large projects. – Steve B Jul 6 '12 at 11:17

Your Answer


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

Browse other questions tagged or ask your own question.