1

How can I create a setup file including sql server 2008 that is needed for database for a c# project ?

2 Answers 2

1

To create a setup file for your project, you can use Setup Project, it will handle many things for you, however if you want also to include the sql server, you can include its setup file, and then run it programmatically using Process.Start method, and pass the required args to it. Check out here, here and here is for examples on how it could be done.

Sign up to request clarification or add additional context in comments.

2 Comments

the setup project will include the database engine ?
Updated the answer, check it.
0

I have faced the same problem about how to get the setup file to work in any other device although it takes some time for me to understand the process but finally i have found that it's really simple.

1) you need to change the connection string to something like that :

string connectionStr = @"Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|DatabaseName.mdf;Integrated Security=True";

2) you can use Advanced Installer to generate the setup file, the process is simple, you can watch any short tutorial about how to get the setup file with Advanced Installer on youtube.

3) Finally, You have to install 3 programs as Prerequisites in client pc :

  • .Net Framework (I think started from version 4.5)
  • Sql Server Express
  • SSMS (Sql Server Management Studio)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.