简体   繁体   中英

is there a way to create a .NET installer for a solution with a windows forms and web app project?

I need to create an installer program that will do install the following:

1. ASP.Net Website
2. Windows Forms application

with prerequisites(SQL Server 2008 express, .net Framework, IIS)

Both are under the same solution,

我的解决方案

they share the same libraries and layers (data layer, business layer, etc)

在此处输入图片说明

So I'm facing a problem, because I think I should create 2 installers, one for the windows project and one for the web project, but this approach has a problem, it will create a data layer, a business layer and a common layer for each project, so if I want to update a layer, lets say I modified the data layer and I want to update it, I'll have to update both, so it occurred to me install those libraries in the GAC, but I don't know how to do it.

I also don't know if it's a good idea to create two installers, or if it's possible to create only one.

So basically the question is, do you know how to deal with:

shared libraries Windows and web applications under the same solution Prerequisites IIS perms and configuration (pools, users, virtual directories)

all that inside the installer

We can buy installshield or similar if needed,

Thanks !!

I have worked on many projects with similar shared code block as you have neatly drawn out.

Experience has taught me to go with separate installers as you may want to update a single part of the client application, for instance, adding a couple of user option fields to the database and win forms application, which does not need an immediate rebuild of the web application.

With regards to installation, I would go with ClickOnce deployment ( Click Once on MSDN ) it's built in to Visual Studio, check out your project properties. It is easy to build, incorporates any pre-requisites you may have and can be installed from a central location. To update all your users, you simply click the publish button and they all have the latest version on next run.

I too would stay away from the GAC it is not worth the hassle.

Whether you should have one or two installers is really more a function of how your product will be used. If these two should always be installed together, a single installer seems to make more sense.

The MSI project in Visual Studio is very limited. VS2010 has InstallShield LE, but it's pretty cripped. I would try using LE, and buy InstallShield 2012 only if I had to (it's pricey).

As for the GAC, I would stay away unless your libraries will be shared across other products.

It will be hard to create a single installer for both program. You will need to customize the msi installer for the winform application and execute the webSite Installer packaged in the msi. Try first to do two installation system before combining them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM