Click here to Skip to main content
15,890,043 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have project in visual studio 2005.which has database with it .so how can i make installer file of that project.because i have made the installer file but database has not attached in that file... so please help me in this..
thanks
Posted
Comments
zyck 12-Feb-12 10:10am    
make your database .mdf file and change your connectionString on web.config

1 solution

two ways: attach your database to your program and change connection string accordingly,
or add another project to your solution that creates the necessary database (a simple console app) from a text file that contains the script of database creation. You can launch this project executable after installation as a custom action, launch it on the first run of program, or launch it after verifying that your database is absent in the computer.
i prefer last item of the second approach
 
Share this answer
 
Comments
thakurajay93 13-Feb-12 2:55am    
can you send me the demo of this solution..please

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900