In this example i am going to explain how to create setup and deployment project for winforms windows application using visual studio 2005/2008/2010.
Similar approach can be applied for creating setup project for web application as well.
First of all create any sample windows/web application.
Create setup project
Right click on solution explorer root and select Add > New project