"How long were you doing this project?" is correct, because you are measuring time for a short-term project. We sometimes say, "How long did you do that job" when talking about someone's old job, but that's usually something measured in years, and we really don't use that kind of phrase for other topics.