Build my application, create an executable and a setup program - c#

I created a WPF C# application and using entity framework to connect to an SQL database, and read write data to it.
My application have multiple library projects and the main project that contains the UI.
I want to build the application in order to sell it. I want to have something similar to a normal application, where you have a main exe executable and .dll diles that represent the other projects and libraries used.
I also need to have a setup file that will setup the application as normal applications do.
How can I do that?
Will I have to do something with the SQL database in order to build with the project or that is done automatically?

If you have VS2010 you can use VS2010 based "Setup and Deployment" project template to create a Setup project and chose any of the given type i.e. CAB with Setup.exe or MSI or web Deployment which is suitable for your distribution. The UI is as below:
You can also try 3 party Installation project i.e. InstallShield etc also.
For SQL DB there are separate ways to distribute the database. If you have SQL Express or SQL CE then you can package it and ship with main project as described here. However for SQL Server, you just need to create a database deployment script and documentation about your data base first and then package it with main distribution. Or it can be done separately.

Related

VS102 Setup including the Setup file for Postgresql Database and Scripts

I am trying to create a windows installer which will include both the application setup files as well as the setup file for the Postgresql Database(if not present in the installed system) with some ddl scripts which will run post installation.
Request you to please guide me on how should i go ahead with meeting the requirement.
WiX allows you to create installer bundles. This means you can package PostgreSQL and your application in a single installer and let it install PostgreSQL (and other prerequisites) before your application. Other installer solutions have similar capabilities.

How can I create a fully distributable C# application with a proper install?

Is it possible to create a fully-distributable application using C# that installs in a "proper" location (i.e. C:\Program Files\MyAppName) using only Visual Studio?
I'm new to creating stand-alone apps and I have created a first simple test app, but now wish to develop a home inventory-type application. It requires the distributable SQL Server database (which I used in my test app), and I would like it to install to a "normal" location. Right now, it seems to install to C:\Users\%Username%\AppData\Local\Apps\2.0.
Can this be done with C#, or does it require some 3rd party installation creation package?
As long as they don't rely on assemblies in the GAC, etc. .NET applications are standalone / "fully-distributable" by default. The most common way that I install my applications to other machines is by copying the output folder, (bin\Release for example) to my desired install location. For applications that are to be downloaded off of a website, zipping the folder should be sufficient, and the user can unzip to any location that they wish.

create setup for an app with MSSQL server at backend

I want to create a setup file for an application that uses the following tools and technologies:
Microsoft visuals studio 2013
MSSQL server 2012
and I have used winforms and C# to write the program.
My questions are:
If I want to deliver the application to customer without giving out the source code what technique or tool should I use?
How do i supply the database? Should I detach it? How do I provide the database with my application?
I'm assuming you need to deploy the application you've created with Visual Studio rather than deploy Visual Studio itself. In which case you have a variety of options depending on its destination.
You can just copy your executable and required dependencies to a destination without distributing your source. However, there are several tools out there that will subsequently disassemble your assemblies to reveal the source.
The Visual Studio website has a list of options for deploying applications. If you want a tradional Next -> Next -> Finish type of installation, I would suggest using InstallShield Limited Edition.
For SQL deployment it would depend on the Edition you have used and whether the server already exists at the destination. Additionally, it will depend on whether you only need to deploy the schema or populate the database too.
You can distribute SQL Server Express with your application. SQL Server Management Studio will allow you to generate a "CREATE DATABASE" script (right-click database -> Script database as -> CREATE to -> File) from your existing database that can be executed as part of the installation. Alternatively, consider a backup/restore approach as detailed in this article.

How To Deploy A Windows Application That Uses SQL Server (Standalone EXE)

I currently access & write data to/from text files but want to make a move over to SQL Server (Also not yet sure which version). Note: This is a Windows Desktop, Windows Forms Application.
My application uses a DB (Single user) & I want to deploy JUST the EXE file, no additional DB/Access tables etc (I want to use SQL Server rather than MSAccess anyway).
What would be the best way to install the tables of the DB onto my users machines? (I also don't want to use MSI installers etc, JUST an EXE file).
Assuming there is an instance of SQL Server available on the client, you could use my company's product BuildMaster to create this EXE for you. Once you've installed it you can:
Install the SQL Server extension (Admin > BuildMaster Extensions)
Create a new Standard Application
Select "Configuration > "Database Connections" from the application menubar
Register a new connection with a fresh SQL Server database
Initialize the database within BuildMaster
Visit "Configuration > "SQL Change Scripts" from the application menubar
Choose "Add Change Script" to upload the script file(s) you'd like to make an EXE from
Once saved, you can select "Download Deployment Tool", this will generate a standalone EXE with the script contained within it
This generated EXE can run with optional arguments (e.g. a custom connection string) as specified in the Using the Change Script Package documentation. Also note that it will only run the scripts one time against the target database. For more information about that, you can read the change script documentation.
Not surprisingly, this is how we deploy BuildMaster's database itself; the tool is contained within the installer as an embedded resource and then written to disk and executed by the installer.
SQL Server isn't designed to be embedded into applications. Consider using an embed-able SQL database such as SQLLite or SQL Server Compact. You can also use certain methods to install SQL Server Express with your application.

Publish Winforms Application to a website

I've built a Winforms Application, and I want to publish it. I'd like to have a link on a website https://sites.google.com/site/satsavvyboardgame/home where I can have the user download the application and have it install on their computer. So far, I haven't found any way to wrap everything up in one package, or successfully publish to the web. What are the specifications for the URL to publish to the web?
Is there any way to package everything into one item (the site won't allow me to upload/download folders), so that the user could download one item, then run that or something in it?
Is there another way to do this that I haven't seen?
I'm using C# Visual Studio 2010 Express, and my application has the code and a couple of XML files that I need to run. All are part of the project, and run fine when I install from a file using the CD publish settings.
I've never published an application before, so any help would be much appreciated. Thanks!
You have 2 general options:
use "ClickOnce" which will enable automatic updates each time the user click to install and have several other benefits such as less problems with priviliges.
Use "Windows-Installer", which allows you more control of how to do and what to do during the installtion phase. However, shamefully, Package & Deployment project types do not exist anymore in vs2012. there are several 3rd party packages you can work with to create your setup-project.
The ClickOnce is preferable if what the user download is a just a simple standalone game application for example.. the MSI is for the more "rich" applications that should make extensive usage in the machine registry and etc..
The table in this link will give you the data you need to make a decision:
http://msdn.microsoft.com/en-us/library/142dbbz4(v=vs.80).aspx

Categories

Resources