Hello,
How do you deploy a vb.net application with a SQL express database?
My vb.net programming book offers a single paragraph that amounts to "Select publish, choose options in wizard, job done". LOL
So I gave it a try and everything seemed ok until I tried to run the program. It errored with many references to SQL... So the deployment wizard isn't smart enough to realise your application has database requirements. Strange that as all the information is sitting their in the app.config xml file. Makes you wonder why they bother exposing all this information if their own wizard can't be bothered to pick it up.
I try the wizard again and make a concerted effort to find the bit where it asks for database information. But it doesn't. I am convinced I must be missing something obvious so if anyone can point me to where or how I get the database added to the deployment I would be grateful.
Fininding the installation directory
After using the setup.exe produced by the wizard I tried to find the setup directory so I could dump a copy of the MDF and be done with it.
Does anyone know where it goes? It wasn't in Program Files, not off the root. I did a search for the exe name across the entire disk and never found it. I opened the shortcut it created but there was a long string which vaguely resembled the name of the exe repeated a few times.
Performing a manual deplyment
If however the wizard is as I suspect, a waste of time then there are a few things I need to get done manually and I wondered if anyone knew of an article that would cover the following:
1. The installation program will need to ask the location of the MDF so that it can build the connection string.
2. The connection string is going to have to be saved somewhere.
3. The program is going to have to check that some form of SQL is running and if not SQLExpress will then need to copy the contents of the MDF up to the running server (the application includes data).
Wow. VB used to be so easy, I must be getting old...
Thanks,
Lex.