简体   繁体   English

有没有办法为带有Windows窗体和Web应用程序项目的解决方案创建.NET安装程序?

[英]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) 有先决条件(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. 所以我遇到了一个问题,因为我认为我应该创建2个安装程序,一个用于Windows项目,一个用于Web项目,但是这种方法存在问题,它将创建一个数据层,一个业务层和一个公共层。对于每个项目,因此,如果我要更新层,可以说我修改了数据层并想要更新它,则我必须同时更新两者,因此我在GAC中安装了这些库,但是我没有不知道该怎么做。

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) Windows和Web应用程序在同一解决方案下共享库先决条件IIS权限和配置(池,用户,虚拟目录)

all that inside the installer 安装程序中的所有内容

We can buy installshield or similar if needed, 如果需要,我们可以购买installshield或类似产品,

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. 经验告诉我,您可能要更新客户端应用程序的单个部分,因此请使用单独的安装程序,例如,将几个用户选项字段添加到数据库中并赢得表格应用程序,而无需立即重建该应用程序。 Web应用程序。

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. 关于安装,我将使用它内置在Visual Studio中的ClickOnce部署( 在MSDN上单击“一次” ),检查您的项目属性。 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. 我也将远离GAC,这不值得麻烦。

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. Visual Studio中的MSI项目非常有限。 VS2010 has InstallShield LE, but it's pretty cripped. VS2010具有InstallShield LE,但功能相当有限。 I would try using LE, and buy InstallShield 2012 only if I had to (it's pricey). 我将尝试使用LE,并且仅在必须这样做时才购买InstallShield 2012(价格昂贵)。

As for the GAC, I would stay away unless your libraries will be shared across other products. 至于GAC,除非您的图书馆可以在其他产品之间共享,否则我会远离的。

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. 您将需要为winform应用程序自定义msi安装程序,并执行打包在msi中的webSite安装程序。 Try first to do two installation system before combining them. 组合之前,请先尝试做两个安装系统。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 有什么方法可以为ASP.Net Web应用程序安装程序创建补丁? - Is there any way to create a patch for an ASP.Net web application installer? 为适用于多种环境的ASP.NET Web APP创建安装程序 - Create Installer for an ASP.NET web APP for multiple environments .net web 窗体、windows 窗体项目和 IIS 窗体身份验证之间有什么关系? - What is the relation between .net web forms, windows forms project and the IIS Forms authentication? 在VisulaStudio 2017上创建和编辑ASP.net Web表单项目 - Create and Edit ASP.net web forms project on VisulaStudio 2017 使用Asp.net Web表单创建与Windows相同的计算器 - Using Asp.net web forms to create a calculator same as windows 使用数据库和Windows服务为Web应用制作安装程序 - Making an installer for a web app with database and a windows service 将.Net Core项目与Web Forms项目一起使用 - Using .Net Core project with Web Forms projects 寻找针对Web表单的打包的.Net安全解决方案 - In search of a packaged .Net security solution for web-forms ASP .NET 3.5 Web窗体的捆绑和缩小解决方案 - Bundling and Minification Solution for ASP .NET 3.5 Web Forms 我可以使用 Windows Forms GUI 创建 ASP.NET 核心 Web 服务吗? - Can I create a ASP.NET Core Web Service with a Windows Forms GUI?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM