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

When using SPMetal to generate entity classes, these classes are used in LINQ to SharePoint queries.

We have a project with content type and list definitions and one project with business logic which use the generated entity classes. But in an automated build approch what is the best way to make sure that we always have updated entity classes after a change in a content type and list instance?

I am thinking of making a "Post-build event" command in the Content Type and List definition project.

share|improve this question
up vote 4 down vote accepted

Use a pre-build event (not post-build!) as described in:

share|improve this answer

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.