我在带有 .NET 4 的 Visual Studio 2010 中有一个包含 2 个项目的解决方案。一个项目是共享库(“Widget”),另一个是 WiX 设置项目(“Setup”)。WiX 项目是为 v3.6 创建的
我将解决方案和项目升级到 Visual Studio 2012 和 WiX 3.7(仍然针对 .NET v4),但我的安装项目由于引导程序错误而无法构建。
在我的项目文件中,我声明了以下内容
<!-- WiX Bootstrapper for installing prerequisites-->
<ItemGroup>
<BootstrapperFile Include=".NETFramework,Version=v4.0">
<ProductName>.NET Framework 4.0</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="Microsoft.Windows.Installer.4.5">
<ProductName>Windows Installer 4.5</ProductName>
</BootstrapperFile>
</ItemGroup>
<Target Name="AfterBuild">
<GenerateBootstrapper ApplicationFile="$(TargetFileName)"
ApplicationName="My Widget"
BootstrapperItems="@(BootstrapperFile)"
ComponentsLocation="Relative"
CopyComponents="True"
OutputPath="$(OutputPath)"
Path="C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\"/>
</Target>
但是,当我构建安装项目时,它会失败并出现以下问题(抱歉冗长,只是想详细说明)
7>------ Rebuild All started: Project: My.Project.Setup, Configuration: Debug x86 ------
7> C:\Program Files (x86)\WiX Toolset v3.7\bin\candle.exe -dDebug -d"DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\\" -dSolutionDir=X:\Source\My.Project\ -dSolutionExt=.sln -dSolutionFileName=My.Project.sln -dSolutionName=My.Project -dSolutionPath=X:\Source\My.Project\My.Project.sln -dConfiguration=Debug -dOutDir=bin\Debug\ -dPlatform=x86 -dProjectDir=X:\Source\My.Project\My.Project.Setup\ -dProjectExt=.wixproj -dProjectFileName=My.Project.Setup.wixproj -dProjectName=My.Project.Setup -dProjectPath=X:\Source\My.Project\My.Project.Setup\My.Project.Setup.wixproj -dTargetDir=X:\Source\My.Project\My.Project.Setup\bin\Debug\ -dTargetExt=.msi -dTargetFileName=My.Project.Setup.msi -dTargetName=My.Project.Setup -dTargetPath=X:\Source\My.Project\My.Project.Setup\bin\Debug\My.Project.Setup.msi -dMy.Project.Widget.Configuration=Debug -d"My.Project.Widget.FullConfiguration=Debug|x86" -dMy.Project.Widget.Platform=x86 -dMy.Project.Widget.ProjectDir=X:\Source\My.Project\My.Project.Widget\ -dMy.Project.Widget.ProjectExt=.csproj -dMy.Project.Widget.ProjectFileName=My.Project.Widget.csproj -dMy.Project.Widget.ProjectName=My.Project.Widget -dMy.Project.Widget.ProjectPath=X:\Source\My.Project\My.Project.Widget\My.Project.Widget.csproj -dMy.Project.Widget.TargetDir=X:\Source\My.Project\My.Project.Widget\bin\Debug\ -dMy.Project.Widget.TargetExt=.exe -dMy.Project.Widget.TargetFileName=My.Project.Widget.exe -dMy.Project.Widget.TargetName=My.Project.Widget -dMy.Project.Widget.TargetPath=X:\Source\My.Project\My.Project.Widget\bin\Debug\My.Project.Widget.exe -out obj\Debug\ -arch x86 -ext "C:\Program Files (x86)\WiX Toolset v3.7\bin\\WixUIExtension.dll" -ext "C:\Program Files (x86)\WiX Toolset v3.7\bin\\WixNetFxExtension.dll" Product.wxs
7> C:\Program Files (x86)\WiX Toolset v3.7\bin\Light.exe -out X:\Source\My.Project\My.Project.Setup\bin\Debug\My.Project.Setup.msi -pdbout X:\Source\My.Project\My.Project.Setup\bin\Debug\My.Project.Setup.wixpdb -cultures:null -ext "C:\Program Files (x86)\WiX Toolset v3.7\bin\\WixUIExtension.dll" -ext "C:\Program Files (x86)\WiX Toolset v3.7\bin\\WixNetFxExtension.dll" -contentsfile obj\Debug\My.Project.Setup.wixproj.BindContentsFileListnull.txt -outputsfile obj\Debug\My.Project.Setup.wixproj.BindOutputsFileListnull.txt -builtoutputsfile obj\Debug\My.Project.Setup.wixproj.BindBuiltOutputsFileListnull.txt -wixprojectfile X:\Source\My.Project\My.Project.Setup\My.Project.Setup.wixproj obj\Debug\Product.wixobj
7>X:\Source\My.Project\My.Project.Setup\My.Project.Setup.wixproj(71,5): error MSB3152: To enable 'Download prerequisites from the same location as my application' in the Prerequisites dialog box, you must download file 'WindowsInstaller4_5\WindowsXP-KB942288-v3-x86.exe' for item 'Windows Installer 4.5' to your local machine. For more information, see http://go.microsoft.com/fwlink/?LinkId=239883.
7>X:\Source\My.Project\My.Project.Setup\My.Project.Setup.wixproj(71,5): error MSB3152: To enable 'Download prerequisites from the same location as my application' in the Prerequisites dialog box, you must download file 'WindowsInstaller4_5\WindowsXP-KB958655-v2-x86-ENU.exe' for item 'Windows Installer 4.5' to your local machine. For more information, see http://go.microsoft.com/fwlink/?LinkId=239883.
7>X:\Source\My.Project\My.Project.Setup\My.Project.Setup.wixproj(71,5): error MSB3152: To enable 'Download prerequisites from the same location as my application' in the Prerequisites dialog box, you must download file 'WindowsInstaller4_5\WindowsServer2003-KB942288-v4-x86.exe' for item 'Windows Installer 4.5' to your local machine. For more information, see http://go.microsoft.com/fwlink/?LinkId=239883.
7>X:\Source\My.Project\My.Project.Setup\My.Project.Setup.wixproj(71,5): error MSB3152: To enable 'Download prerequisites from the same location as my application' in the Prerequisites dialog box, you must download file 'WindowsInstaller4_5\WindowsServer2003-KB958655-v2-x86-ENU.exe' for item 'Windows Installer 4.5' to your local machine. For more information, see http://go.microsoft.com/fwlink/?LinkId=239883.
7>X:\Source\My.Project\My.Project.Setup\My.Project.Setup.wixproj(71,5): error MSB3152: To enable 'Download prerequisites from the same location as my application' in the Prerequisites dialog box, you must download file 'WindowsInstaller4_5\WindowsServer2003-KB942288-v4-x64.exe' for item 'Windows Installer 4.5' to your local machine. For more information, see http://go.microsoft.com/fwlink/?LinkId=239883.
7>X:\Source\My.Project\My.Project.Setup\My.Project.Setup.wixproj(71,5): error MSB3152: To enable 'Download prerequisites from the same location as my application' in the Prerequisites dialog box, you must download file 'WindowsInstaller4_5\WindowsServer2003.WindowsXP-KB958655-v2-x64-ENU.exe' for item 'Windows Installer 4.5' to your local machine. For more information, see http://go.microsoft.com/fwlink/?LinkId=239883.
7>X:\Source\My.Project\My.Project.Setup\My.Project.Setup.wixproj(71,5): error MSB3152: To enable 'Download prerequisites from the same location as my application' in the Prerequisites dialog box, you must download file 'WindowsInstaller4_5\Windows6.0-KB958655-v2-x86.MSU' for item 'Windows Installer 4.5' to your local machine. For more information, see http://go.microsoft.com/fwlink/?LinkId=239883.
========== Rebuild All: 6 succeeded, 1 failed, 0 skipped ==========
有任何想法吗?Packages 位置有效,我验证了它的存在....