Bootstrapper (setup.exe) 提示“未找到 .NET 3.5”但启动.msi直接安装应用程序没有问题

发布于 2024-08-27 13:54:44 字数 1678 浏览 5 评论 0原文

我们的安装程序会生成一个引导程序 (setup.exe) 和一个 MSI 文件 - 这是一种非常常见的情况。

其中一台生产计算机在安装过程中报告了一个奇怪的问题:

  • 如果用户启动引导程序 (setup.exe),它会报告未安装 .NET 3.5。管理员组下的帐户会发生这种情况。无论他们是否以管理员身份启动它,行为都是相同的。

  • 无论是否应用以管理员身份运行,直接启动 application.msiOurInstallLauncher.exe(请参阅下面的说明)时,应用程序都可以正常安装。

  • 我们已检查计算机上是否安装了 .NET(64 位和 32 位“版本”= 在 C:\Windows\Microsoft.NET\Framework64C:\Windows 下\Microsoft.NET\Framework 有一个名为 v3.5 的文件夹。

这种情况发生在 64 位 Windows 7 上。我无法在我的开发 64 位 Windows 7 上重现它。到目前为止,它在 Windows XP 和 Vista 上运行很长一段时间,没有任何问题

。声明GenerateBootStrapper任务(没什么特别的):

<ItemGroup>
  <BootstrapperFile Include="Microsoft.Windows.Installer.3.1">
    <ProductName>Microsoft Windows Installer 3.1</ProductName>
  </BootstrapperFile>
  <BootstrapperFile Include="Microsoft.Net.Framework.3.5">
    <ProductName>Microsoft .NET Framework 3.5</ProductName>
  </BootstrapperFile>
</ItemGroup>

  <GenerateBootstrapper
    ApplicationFile=".\Files\OurInstallLauncher.exe"        
    ApplicationName="App name"
    Culture="en"
    ComponentsLocation ="HomeSite"
    CopyComponents="True"
    Validate="True"
    BootstrapperItems="@(BootstrapperFile)"
    OutputPath="$(OutSubDir)"
    Path="$(SdkBootstrapperPath)" />

注意:OurInstallLauncher.exe是根据用户选择将转换应用于msi的语言选择器,这与问题根本无关,因为安装程序永远不会获取。至于启动此 exe!

编辑:启动 setup.exe 后显示缺少 .NET 3.5,并建议安装 .NET 3.5。当用户同意安装时,.NET 3.5 安装程序会提示 .NET 3.5 已安装,并且 MSI 安装程序将继续进行。如果他们选择不安装 .NET 3.5,安装就会结束。

以前有人见过这种行为吗?

Our installer generates a bootstrapper (setup.exe) and a MSI file - a pretty common scenario.

One of the production machines reports a strange problem during install:

  • If the user launches the bootstrapper (setup.exe), it reports that .NET 3.5 is not installed. This happens with account under administator group. No matter if they launch it as administrator or not, same behavior.

  • the application installs fine when application.msi or OurInstallLauncher.exe (see below for explanation) is started directly no matter if run as administrator is applied.

  • We have checked that .NET is installed on the machine (both 64bit and 32bit "versions" = under both C:\Windows\Microsoft.NET\Framework64 and C:\Windows\Microsoft.NET\Framework there is a folder named v3.5.

This happens on a 64 bit Windows 7. I can not reproduce it on my development 64 bit Windows 7. On Windows XP and Vista, it has worked without any problem for a long time so far.

Part of our build script that declares the GenerateBootStrapper task (nothing special):

<ItemGroup>
  <BootstrapperFile Include="Microsoft.Windows.Installer.3.1">
    <ProductName>Microsoft Windows Installer 3.1</ProductName>
  </BootstrapperFile>
  <BootstrapperFile Include="Microsoft.Net.Framework.3.5">
    <ProductName>Microsoft .NET Framework 3.5</ProductName>
  </BootstrapperFile>
</ItemGroup>

  <GenerateBootstrapper
    ApplicationFile=".\Files\OurInstallLauncher.exe"        
    ApplicationName="App name"
    Culture="en"
    ComponentsLocation ="HomeSite"
    CopyComponents="True"
    Validate="True"
    BootstrapperItems="@(BootstrapperFile)"
    OutputPath="$(OutSubDir)"
    Path="$(SdkBootstrapperPath)" />

Note: OurInstallLauncher.exe is language selector that applies a transform to the msi based on user selection. This is not relevant to the question at all because the installer never gets as far as launching this exe!

EDIT: It displays that .NET 3.5 is missing right after starting setup.exe and proposes to install .NET 3.5. When the user agrees with the install, the .NET 3.5 installer says that .NET 3.5 is already installed and the MSI installer proceeds. If they choose to not install .NET 3.5, the installation ends.

Has anyone seen this behavior before?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

酸甜透明夹心 2024-09-03 13:54:44

这似乎是 Bootstrapper 或 Windows 7 中的错误。

解决方案:

C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\DotNetFX35\en\package .xml
必须在构建计算机上进行调整,因为默认的德语 Windows 7 安装没有此密钥:

  <RegistryCheck Property="DotNet35InstallSuccess" 
Key="HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\1033" Value="Install" />

因此,安装程序报告目标计算机(德语 Windows 7)上未安装 .NET 3.5。

为了让安装程序正确检测已安装的 .NET,
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\DotNetFX35\en\package.xml
文件必须进行如下调整:

\1033 必须从注册表检查项中删除:

  <RegistryCheck Property="DotNet35InstallSuccess" 
Key="HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5" Value="Install" />

This seems to be a bug either in Bootstrapper or in Windows 7.

Solution:

C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\DotNetFX35\en\package.xml
has to be tweaked on the build machine, because default German Windows 7 installations do not have this key present:

  <RegistryCheck Property="DotNet35InstallSuccess" 
Key="HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\1033" Value="Install" />

As a result, the installer reported that .NET 3.5 is not installed on the target machine (German Windows 7).

In order for the setup to detect installed .NET correctly,
the C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\DotNetFX35\en\package.xml
file must be tweaked as following:

\1033 must be removed from the registry check key:

  <RegistryCheck Property="DotNet35InstallSuccess" 
Key="HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5" Value="Install" />
傲娇萝莉攻 2024-09-03 13:54:44

考虑到 MSI 安装没有问题并不令人意外,因为它只是引导程序负责安装 .NET 3.5。 MSI 包不需要 .NET 即可安装(除非您使用在 .NET 程序集中实现的自定义操作,或在 GAC 中注册 .NET 程序集)。

在出现问题的计算机上卸载并重新安装 .NET。它很可能只是一个 .NET 安装已被某种方式损坏。

The fact that the MSI installs without problems is not surprising, considering that it is only the bootstrapper which concerns itself with installing .NET 3.5. MSI packages don't need .NET in order to be installed (unless you use custom actions implemented in .NET assemblies, or register .NET assemblies in the GAC).

Uninstall and reinstall .NET on the machine that has the issue. It is most likely just a .NET install that has been corrupted somehow.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文