-1

I am building a desktop application where it uses a local database file (.mdf). Since I was developing it on my machine I used SQL Management 2008 R2 SP2. Then I sent it out to others for feedback. But unfortunately they were not able to use it as they didn't have SP2 installed.

So, as a resolution, I want to include a sql file that would run while installing the application. I was wondering if someone could direct me how to do so.

What I have and what I think should be done is: - Main Project (includes forms and classes - I have this working already) - Setup Project (includes msi file that checks database existence and runs sql file accordingly - I need help on this)

user1889838
  • 325
  • 4
  • 13
  • 37

1 Answers1

0

I suggest you using wix to create the msi.

You know, you can no longer create setup project using visual studio (Version 2012 above). It has been removed completely.

So you should consider going in WIX (Windows Intaller XML) direction.

If you like the idea here is the quick and easy solution:

http://www.codeproject.com/Articles/331368/WIXDataBase

http://wix.tramontana.co.hu/tutorial/sql/creating-a-database

But its completely up to you to think about the alternatives.

Bravo11
  • 898
  • 2
  • 11
  • 24