【问题标题】:Creating MSI Installer with dotNetFramework inside it在其中创建带有 dotNetFramework 的 MSI 安装程序
【发布时间】:2011-07-17 10:26:51
【问题描述】:

我的电脑上确实安装了 VS2008。我开发了一个小应用程序。现在我准备将它部署到我客户的机器上。

由于我的客户没有在他的 winXP 中安装 .NetFramework,我想用我正在构建的 .netframework 和我的应用程序构建一个 msi 文件。

我尝试创建设置文件,但是当我测试部署时,它开始从互联网下载框架文件。因为我的网络连接太慢了。我发现嵌入 .netframework 是我很好的解决方案。

那么我如何在我的 MSI 中嵌入 .NetFramework

【问题讨论】:

    标签: .net winforms deployment


    【解决方案1】:

    转到您的设置项目属性

    单击先决条件按钮 显示默认先决条件的窗口选择 你想要什么先决条件。

    然后在最后

    从先决条件窗口的三个选项中选择第二个选项 第二个选项是从与我的应用程序相同的位置下载先决条件

    【讨论】:

      【解决方案2】:

      据我所知,你不能那样做。
      您可以做的是将从 Microsoft 网站下载的 .NET Framework 也发送给他,放在另一个文件中。

      【讨论】:

        【解决方案3】:

        这是多年来的 InstallAware 功能(于 2004 年推出)。

        http://www.installaware.com/

        其他安装程序技术供应商可能也有很长一段时间了。它只是从未出现在任何免费解决方案中。

        【讨论】:

          【解决方案4】:

          如果您尝试在 VS2008 中制作安装包,则从与您的应用程序相同的位置安装 3.5 框架,您必须做更多的工作。看到这个MSDN Forum post 还有这个MSDN Document。请参阅2.3.1.1 为 .NET Framework 3.5 SP1 引导程序包启用 Samesite 部分 其中给出了这些说明。

          Update the Package Data 
          
          Open the [Program Files]\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\DotNetFx35SP1 folder or %ProgramFiles(x86)%\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\DotNetFx35SP1 on x64 operating systems 
          Edit the Product.xml file in Notepad. 
          Paste the following into the < PackageFiles > element: 
          <PackageFile Name="TOOLS\clwireg.exe"/>
          <PackageFile Name="TOOLS\clwireg_x64.exe"/>
          <PackageFile Name="TOOLS\clwireg_ia64.exe"/> 
          Find the element for < PackageFile Name="dotNetFX30\XPSEPSC-x86-en-US.exe" and change the PublicKey value to: 3082010A0282010100A2DB0A8DCFC2C1499BCDAA3A34AD23596BDB6CBE2122B794C8EAAEBFC6D526C232118BBCDA5D2CFB36561E152BAE8F0DDD14A36E284C7F163F41AC8D40B146880DD98194AD9706D05744765CEAF1FC0EE27F74A333CB74E5EFE361A17E03B745FFD53E12D5B0CA5E0DD07BF2B7130DFC606A2885758CB7ADBC85E817B490BEF516B6625DED11DF3AEE215B8BAF8073C345E3958977609BE7AD77C1378D33142F13DB62C9AE1AA94F9867ADD420393071E08D6746E2C61CF40D5074412FE805246A216B49B092C4B239C742A56D5C184AAB8FD78E833E780A47D8A4B28423C3E2F27B66B14A74BD26414B9C6114604E30C882F3D00B707CEE554D77D2085576810203010001 
          Find the element for < PackageFile Name="dotNetFX30\XPSEPSC-amd64-en-US.exe" and change the PublicKey value to the same as in step 4 above 
          Save the product.xml file 
          
          
          Download and Extract the Core Installation Files 
          
          Navigate to the following URL: http://go.microsoft.com/fwlink?LinkID=118080 
          Download the dotNetFx35.exe file to your local disk. 
          Open a Command Prompt window and change to the directory to which you downloaded dotNetFx35.exe. 
          At the command prompt, type: 
          dotNetFx35.exe /x:. 
          This will extract the Framework files to a folder named “WCU” in the current directory. 
          Copy the contents of the WCU\dotNetFramework folder and paste them in the %Program Files%\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\DotNetFx35SP1 folder (%ProgramFiles(x86)%\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\DotNetFx35SP1 on x64 operating systems). Note: Do not copy the WCU\dotNetFramework folder itself. There should be 5 folders under the WCU folder, and each of these should now appear in the DotNetFx35SP1 folder. The folder structure should resemble the following:
          o DotNetFx35SP1 (folder) 
              dotNetFX20 (folder 
              dotNetFX30 (folder) 
              dotNetFX35 (folder) 
              dotNetMSP (folder) 
              TOOLS folder) 
              en (or some other localized folder) 
              dotNetFx35setup.exe (file) 
          

          【讨论】:

            【解决方案5】:

            关于 WiX 的 .Net 框架引导程序的讨论已经有了。据我所知,什么都没有发生,从博客文章看来,WiX 项目正在为开发人员资源而苦苦挣扎。所以请留意,但不要期待很快。

            【讨论】:

              猜你喜欢
              • 1970-01-01
              • 1970-01-01
              • 1970-01-01
              • 1970-01-01
              • 1970-01-01
              • 1970-01-01
              • 2018-08-05
              • 1970-01-01
              • 1970-01-01
              相关资源
              最近更新 更多