Click here to Skip to main content
15,886,046 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
C#
0
down vote
favorite
I develope c# windows form application in visual studio 2015 who is connected to a sql server express 2014, application with simple read and write data to database who have only one table, and now I want to put both in same instalation and deploy it on another PC's with OS Windows 10, so user can install application with one click setup, next, next, finish. How can I do it? I need step by step, because I read a lot of articles and do some of the examples and no one work. Is it better to use SQL Server Compact or SQLite, to use Visual Studio Installer or Advanced Installer, do I must write a scripts or can do it with ssdt or give me any other sugestion. Thanks in advance!


What I have tried:

I tried with Visual Studio Installer and Advanced Installer, I try with ssdt to create in same solution winform and data project and to together build it but nothings work!
Posted
Updated 4-Apr-16 21:24pm
Comments
Philippe Mori 4-Apr-16 22:18pm    
Installing SQL Server Express is not really easy as you might have version or language conflict and I even think that older versions are sometime blocked from installing.

The easiest way is to tell the user to install it and provide no support!

It is much easier to install "in process" databases like SQL CE but also it is not always trivial to update code to work with another database and the performance might also be affected.

If, as your question seems to imply, you have a single user on Windows 10, it would be much simpler to manually install SQL Server Express from official source.

1 solution

The easiest way might be to use a ClickOnce installation and add SQL Server as a prerequisite, see: ClickOnce - Quick steps to Deploy, Install and Update Windows Based Client Applications[^] and: ClickOnce deployment vs. requestedExecutionLevel = requireAdministrator[^]

In general it is not recommended to deliver SQL Server with your application, but sometimes you have no other option.
See this tip for an SQL Server 2008 R2 installer: Inno Setup Script to Install SQL Server 2008 R2 with Tools[^]

But as your needs are simple, you can also use localDB which is only about 33 Mb: Getting Started with SQL Server 2012 Express LocalDB[^]

Here is a comparison of SQL Server Compact, SQLite, SQL Server Express and LocalDB: Everything SQL Server Compact: Comparison of SQL Server Compact, SQLite, SQL Server Express and LocalDB[^]
 
Share this answer
 
v3

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