Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Project Deployment
I am trying to deploy a beta of my first project and was wondering if anyone had any suggestions of how to include a separate folder of files in the deployment (they are to be stored on the C:\ drive once the install is completed, outside of the installation directory). Do I add them in the reference paths area of the properties wizard prior to publishing? I'm new to deployment of projects. I'm currently using Visual Studio 2012.
 
Also, how can I deploy a SQL Server Compact database? When I try to install a deployment on another computer, it tells me that the path to the database is invalid. It's still referencing the path name in the project.
Posted 8-Oct-12 5:54am
Edited 8-Oct-12 7:58am
v3
Comments
Sergey Alexandrovich Kryukov at 8-Oct-12 14:39pm
   
To start with, you should not even assume C: exists on the target computer of your customer -- it really may not exist. All deployment is done to the directory supplied by the user, with a possibility of using some defaults, of course.
--SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You can add any files to the installation, even if they are not in your project used to build the software. You can add such directory and files when you create a deployment project. For example, if you create a deployment project from the project template "Setup and Deployment" which comes with Visual Studio, you will immediately see such possibility in the project tree (as a part of Solution Explorer) and its context menus.
 
I think the most recommended way of deploying of the SQL Server is making it a prerequisite for your product. This can resolve all possible licensing issues and the cases when a user already has the same or compatible server installed, so it gives more convenience and flexibility to your user as well.
 
—SA
  Permalink  
Comments
joshrduncan2012 at 8-Oct-12 15:18pm
   
Thanks! What is the suggestion as to how to dynamically assign the connection string instead of hardcoding the path name to the database? That's what is preventing me from successfully installing the deployment.
Sergey Alexandrovich Kryukov at 8-Oct-12 16:12pm
   
Basically, it should be prescribed in a configuration file. The setup project can present some default; and the user should be able to manually override it, even after the setup.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 220
1 kbrandwijk 100
2 Richard MacCutchan 100
3 Vinay Mistry 70
4 Mukesh Bhagat 65
0 Sergey Alexandrovich Kryukov 9,040
1 OriginalGriff 8,121
2 CPallini 2,613
3 Richard MacCutchan 2,221
4 Abhinav S 1,928


Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 8 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100