简体   繁体   English

.NET 使用 Visual Studio 2008 设置项目

[英].NET setup projects using Visual Studio 2008

When you create a Setup project for a Windows/Console application, you find that there are two outputs.当您为 Windows/Console 应用程序创建安装项目时,您会发现有两个输出。

  1. Setup.exe安装程序
  2. .msi .msi

What does setup.exe and .MSI do? setup.exe 和.MSI有什么作用? Which one should be used for installation?安装时应该使用哪一种?

I have seen that I can install the application using both.我已经看到我可以使用两者来安装应用程序。 But Setup.exe is fairly small file compared to the .MSI file.但是与.MSI文件相比,Setup.exe 是相当小的文件。

Questions问题

  1. If I have to ship to the client.如果我必须运送给客户。 I cannot send two files.我无法发送两个文件。 What's the best approach to merge these two files into one Setup file?将这两个文件合并为一个安装文件的最佳方法是什么?

  2. I have read that Setup.exe is a bootstrapper which checks the .NET framework and then calls the.MSI file.我读过 Setup.exe 是一个引导程序,它检查 .NET 框架,然后调用 .MSI 文件。 Is it correct?这是对的吗?

  3. I couldn't test for the unavailability of .NET framework because I'm a .NET developer and also my team works on .NET and have .NET installed.我无法测试 .NET 框架的不可用性,因为我是 .NET 开发人员,而且我的团队也在 .NET 上工作并安装了 Z303CB0EF9EDB9D9872DAZ6。 I didn't want to risk the Visual Studio by uninstalling the .NET framework and testing the setup application.我不想通过卸载 .NET 框架和测试安装应用程序来冒险 Visual Studio。

How does it install .NET framework?它如何安装 .NET 框架? It is 200 MB odd, but my setup is less than 3 MB.它是 200 MB 奇数,但我的设置小于 3 MB。

Does it give a option to download or something?它是否提供下载或其他选项?

Any help appreciated.任何帮助表示赞赏。

Thanks,谢谢,

The MSI is the installer for you application. MSI 是您应用程序的安装程序。 The setup file is a bootstrap that will check for pre-reqs.安装文件是一个引导程序,将检查 pre-reqs。 Like correct version of the windows installer.就像 windows 安装程序的正确版本一样。 I think it is also the setup.exe that will allow download of the right version of the .NET framework.我认为这也是 setup.exe 将允许下载正确版本的 .NET 框架。 You can use the.MSI on its own, you can't use just the setup.exe.您可以单独使用.MSI,不能只使用setup.exe。

You are correct that the setup allows the download of the correct version of .NET framework.您是正确的,该设置允许下载正确版本的 .NET 框架。

There are ways to merge the MSI and the Setup.exe to create a single exe.有多种方法可以合并 MSI 和 Setup.exe 以创建单个 exe。 Things like a self-extracting zip or iexpress.诸如自解压 zip 或 iexpress 之类的东西。

Why can't you send them both files though?为什么你不能同时发送他们两个文件呢? I think if you publish the setup and msi on a server for download the setup will find and download your MSI when it is required.我认为,如果您在服务器上发布设置和 msi 以供下载,则设置会在需要时找到并下载您的 MSI。

The reason for the separate setup.exe I think is due to the fact that you cannot have two MSI installations running at the same time.我认为单独 setup.exe 的原因是因为您不能同时运行两个 MSI 安装。 Therefore if your application requires prerequisites installed by the MSI your installation will run into trouble.因此,如果您的应用程序需要 MSI 安装的先决条件,您的安装将遇到麻烦。

With regards to setting up the framework you could in the project settings include the .NET framework as a prerequisite of your application and will this get installed if not already present on the target machine.关于设置框架,您可以在项目设置中包括 .NET 框架作为您的应用程序的先决条件,如果目标计算机上尚未安装它,它将被安装。 You can further choose to package the installation or download it from the internet您可以进一步选择package安装或从网上下载

Setup.exe is indeed a bootstrapper that checks if the prerequisites are available on the client's machine. Setup.exe 确实是一个引导程序,用于检查客户端计算机上是否存在先决条件。 This includes the.Net Framework, but also for example SQL Compact Edition when you select this in the project's properties.这包括 .Net Framework,也包括 SQL 精简版,当你在项目的属性中 select 这个。 It will not uninstall anything.它不会卸载任何东西。 When a prerequisite is needed, it will give the option to download that from the Internet or stop the installation.当需要先决条件时,它将提供从 Internet 下载或停止安装的选项。

The MSI file is a Windows Installer file containing your software. MSI 文件是包含您的软件的 Windows 安装程序文件。 This MSI takes care of installing your product on the client's machine.此 MSI 负责在客户端机器上安装您的产品。 If you ship only the MSI, the product will only install on a machine that has all prerequisites installed before launching the MSI.如果您仅提供 MSI,则该产品将仅安装在启动 MSI 之前已安装所有先决条件的计算机上。

If you want to do a single file distribution, you can combine the 2 files in a single EXE using iexpress.如果要进行单个文件分发,可以使用 iexpress 将 2 个文件合并到一个 EXE 中。 (Iexpress is a piece of software that is distributed with Windows and allows you to create setup packages.) (Iexpress 是一款随 Windows 一起分发的软件,允许您创建安装包。)

Hope this helps.希望这可以帮助。

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

相关问题 Visual Studio 2008中的.NET 2.0安装项目 - .NET 2.0 Setup Project in Visual Studio 2008 在Visual Studio 2008中复制和修改解决方案(带有安装项目) - Copy and modify solutions (with setup projects) in Visual Studio 2008 如何使用Visual Studio 2008使用Sqlserver数据库创建安装项目 - How to Create Setup Project with Sqlserver Database Using Visual Studio 2008 在Visual Studio 2008中将应用程序与项目集成吗? - Integrating applications with projects in Visual Studio 2008? Visual Studio 2008-将两个项目部署到设备 - Visual Studio 2008 - Deploy two projects to device 在Visual Studio安装程序项目中添加自定义对话框 - Adding Custom dialogs in Visual Studio Setup projects Visual Studio 2008安装项目所需的管理员 - Admin required for Visual Studio 2008 Setup Project Visual Studio 2008安装项目警告“找不到先决条件” .Net Framework 3.5 SP1” - Visual Studio 2008 Setup Project warning “Could Not find prerequisite ”.Net Framework 3.5 SP1" Visual Studio 2008:从具有多个项目的解决方案创建单个DLL - Visual Studio 2008: Creating Single DLL from Solution with Many Projects 查找Visual Studio 2008解决方案中dll错误引用的项目的工具 - A tool to find projects erroneously referenced by dll in Visual Studio 2008 solutions
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM