That's a very broad topic. What's going wrong? What have you not been able to do? Are parts working but not other parts?
I've posted an article here on SSC[/url] that covers the basics on how to do what you're asking. I've also written a couple of chapters in Red Gate's Team Development[/url] book on deploying databases using Visual Studio. Let me know if that information doesn't cover what you need.