引导程序(setup.exe)表示“找不到.NET 3.5".但是启动.msi可以直接安装应用程序而不会出现问题 [英] Bootstrapper (setup.exe) says ".NET 3.5 not found" but launching .msi directly installs application without problem

查看:130
本文介绍了引导程序(setup.exe)表示“找不到.NET 3.5".但是启动.msi可以直接安装应用程序而不会出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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:

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

  • 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.

直接启动application.msiOurInstallLauncher.exe(请参见下面的说明),无论是否以管理员身份运行,应用程序都可以很好地安装.

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.

我们已经检查了计算机上是否安装了.NET(64位和32位版本"均位于C:\Windows\Microsoft.NET\Framework64C:\Windows\Microsoft.NET\Framework下),其中有一个名为v3.5的文件夹.

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.

这是在64位Windows 7上发生的.我无法在开发的64位Windows 7上重现它.在Windows XP和Vista上,到目前为止,它一直没有任何问题.

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.

我们的构建脚本的一部分,它声明了GenerateBootStrapper任务(没什么特别的):

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)" />

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

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!

它显示在启动setup.exe之后立即缺少.NET 3.5,并建议安装.NET 3.5.当用户同意安装时,.NET 3.5安装程序会说已经安装了.NET 3.5,并且MSI安装程序会继续进行.如果他们选择不安装.NET 3.5,则安装结束.

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

Has anyone seen this behavior before?

推荐答案

在Bootstrapper或Windows 7中,这似乎都是一个错误.

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

解决方案:

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

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" />

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

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

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

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必须从注册表检查项中删除:

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

这篇关于引导程序(setup.exe)表示“找不到.NET 3.5".但是启动.msi可以直接安装应用程序而不会出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆