Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Help with Window forms Package and Deployment

Help with Window forms Package and Deployment

Help with Window forms Package and Deployment

I am working with Visual Studio 2010. I have a SQL Express database.  I have packaged & deployed asp.net without database many times no issues. But the Window Forms seem frustratingly elusive.

1) I have found little documentation on it. Like no one uses it.
2) I found something about creating a script for the database by opp. clicking the Server Explorer database and stating "Publish to provider" but sketchy and doesn't walk through to conclusion, and when I did it where the script went (if any produced) is lost to me..  Did not see any DB packaged in the one click when done..  Could not see anything added to a deployment project either.

3) One click attempt successfully builds to an exe.. But first told me something about an non-required item being needed. Someone said to force all items to be required. I did. Now when trying to install to test computer it gives me "unknown error" for my efforts.. Hard to Debug, with no valid error..

4) Deployment project  will not let me build..    Unable to update the dependencies of the project.

Is there any good detailed walk through someone can point me to?

RE: Help with Window forms Package and Deployment

it really depends on the dependencies required. personally I find the deployment tools in VS lacking. they are beginning to take shape with asp.net projects, but there is still a lot to be desired. All other project types are missing the deployment features found in asp.net projects.

there are other build tools available: psake (oss) & final builder ($) are both great tools.

I wouldn't go blindly changing build configs without understanding what it is you are doing. a dependency is either required for deployment, or it isn't. so there are not "optional" dependencies.

packaging a DB for a winforms project doesn't make much sense. unless it's a personal, local db. but then you would want something like an embedded database with raven, esent or sqlite. not sqlexpress.
if you are talking about a central database that all clients connect to, then you would have 2 installers.
one for the client machine
another for the server. it could be as simple as creating the database and pre-populating data. or it could be a business tier that is installed on a server.

another factor with deployment libraries is what .net framework you target. starting with .net 4 there are actually 2 different framework installs. client profile and full. full includes the system.web namespace and most of the objects associated with asp.net. the client profile does not have this. the reasoning is that servers run website and need the asp.net objects, but local workstations do not use asp.net and therefore don't need the objects.

if you are using pure BCL libraries this shouldn't be an issue. but if reference a project like log4net. it has a hard dependency on asp.net, so you cannot run log4net using the .net 4.0 client profile. this situation may exist for you which is causing problems as well.

being that .net assemblies are xcopy deployable. i would recommend compiling the code and creating a simple zip file with all the necessary binaries and resources required. then you can just copy and unzip the application anywhere its needed. no installers or MSI packages to deal with.

Jason Meckley

FAQ855-7190: Database Connection Management
FAQ732-7259: Keeping the UI responsive

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close