通过Setup.exe(使用.net Framework 4.0)安装产品时遇到错误

发布于 2024-10-20 05:12:27 字数 748 浏览 6 评论 0原文

将代码从 VS2005 迁移到 VS2010 后,我们无法创建安装程序。我们已经完成了新的引导捆绑程序文件的所有设置,并且使用 msbuild 生成的 setup.exe 能够安装 Windows Installer 4.5(如果系统中不存在),然后成功安装 .net Framework 4.0(如果之前系统上未安装)。但在此之后,它显示以下错误,并且不继续安装我们的产品,而它应该像我们使用 VS2005 时那样安装。

安装 .net 框架后,它显示一个错误,粘贴在下面。

“该产品是为平台设计的,但安装在英特尔上。从制造商处获取正确的设置。”

注意:当我们手动双击setup.exe时也会出现上述错误。

我们注意到一件事,当我们将 setup.exe 拖到命令提示符(通过命令提示符打开 setup.exe)时,它成功运行了产品安装镜头。

一旦通过 setup.exe 安装了 net Framework 4.0,并且当我们尝试通过 Setup.msi 安装产品时,它就会继续安装产品,但这仅在我们安装了 Framework 4.0 时才有效。如果一个系统没有安装framework 4.0,那么通过Setup.msi安装后该产品将无法工作(Setup.msi将仅安装该产品而不是框架)。简而言之,我们必须将 setup.exe 和 setup.msi 的功能合并在一起,以便在安装框架 4.0 后应该继续安装产品。

注意:我们使用 WIX、巡航控制、msbuild 和 Nant 来生成构建。

如果你们中有人遇到过此类错误,请帮助我们。我们将非常感谢您的支持。

We are not able to create the installer after migrating the code from VS2005 to VS2010. We have done all the settings for the new boot strapper file, and the setup.exe which is generated using the msbuild is able to install the windows installer 4.5 (if not present in the system) and then it is successfully installing the .net framework 4.0 (if not installed on the system previously). But after this, it is showing the below error and not continuing with installation of our product which it is supposed to do which it was doing when we were using VS2005.

After installing the .net framework it is showing an error which is pasted below.

"The product is designed for platform but is being installed on Intel. Obtain the correct setup from the manufacturer."

Note: The above error also occurs when we manually double click on the setup.exe.

We have noted one thing that, when we are dragging the setup.exe to command prompt (opening setup.exe through command prompt) it is successfully running the product installation shot.

Once net framework 4.0 is installed through setup.exe and when we are trying to install the product through Setup.msi then it is continuing with the product installation, but this is working only when we have framework 4.0 installed. If one system does not have framework 4.0 installed then the product is not working after installing through Setup.msi(Setup.msi will install only the product and not the framework). In short we have to merge the functionality of setup.exe and setup.msi together so that after installing the framework 4.0 it should continue with the installation of the product.

Note: We are using WIX, cruise control, msbuild and Nant for generating the build.

Please help us if any of you have faced this kind of error. Your support will be much appreciated.

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

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

发布评论

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

评论(1

故事和酒 2024-10-27 05:12:27

问题出在引导程序生成器中,即 7.0A 引导程序生成器。如果 setup.exe 是使用 6.0A 引导程序生成器生成的,则不会出现错误消息。

一种(hacky)解决方案是使用 6.0A 引导程序并为从 7.0A 获取的必备包提供修改后的包描述符 (product.xml)。

将这两个文件夹复制到 C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages 中:

C:\Program Files (x86)\Microsoft SDKs\Windows \v7.0A\Bootstrapper\Packages\WindowsInstaller4_5

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\DotNetFX40

调整你的GenerateBootStrapper任务构建脚本以引用 6.0A 引导程序:

<GenerateBootstrapper
  ApplicationFile="Files\$(TargetName).msi"
  ApplicationName="Your app name"
  Culture="en"
  ComponentsLocation ="HomeSite"
  CopyComponents="True"
  Validate="True"
  BootstrapperItems="@(BootstrapperFile)"
  OutputPath="$(OutSubDir)"
  Path="C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Bootstrapper\" 
/>

<ItemGroup>
  <BootstrapperFile Include="Microsoft.Windows.Installer.4.5">
    <ProductName>Microsoft Windows Installer 4.5</ProductName>
  </BootstrapperFile>
  <BootstrapperFile Include=".NETFramework,Version=v4.0">
    <ProductName>Microsoft .NET Framework 4.0</ProductName>
  </BootstrapperFile>
</ItemGroup>

您还需要调整 DotNetFX40 的 product.xml 来解决您将遇到的 XSD 验证错误(他们显然在 Product.xml 语法中添加了一些功能)。

The problem is in the bootstrapper generator - namely the 7.0A bootstrapper generator. If setup.exe is generated using the 6.0A bootstrapper generator, the error message does not appear.

One (hacky) solution is to use the 6.0A bootstrapper and supply it a modified package descriptor (product.xml) for prerequisite packages taken from 7.0A.

Copy these two folders into C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages:

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\WindowsInstaller4_5

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\DotNetFX40

Tweak your GenerateBootStrapper task in your build script to reference 6.0A bootstrapper:

<GenerateBootstrapper
  ApplicationFile="Files\$(TargetName).msi"
  ApplicationName="Your app name"
  Culture="en"
  ComponentsLocation ="HomeSite"
  CopyComponents="True"
  Validate="True"
  BootstrapperItems="@(BootstrapperFile)"
  OutputPath="$(OutSubDir)"
  Path="C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Bootstrapper\" 
/>

<ItemGroup>
  <BootstrapperFile Include="Microsoft.Windows.Installer.4.5">
    <ProductName>Microsoft Windows Installer 4.5</ProductName>
  </BootstrapperFile>
  <BootstrapperFile Include=".NETFramework,Version=v4.0">
    <ProductName>Microsoft .NET Framework 4.0</ProductName>
  </BootstrapperFile>
</ItemGroup>

You will also need to tweak product.xml of DotNetFX40 to resolve the XSD validation errors you will encounter (they apparently added some features to the product.xml syntax).

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