我在.NET 4的Visual Studio 2010中有2个项目的解决方案。 一个项目是共享库(“Widget”),另一个是WiX安装项目(“安装”)。 WiX项目是为v3.6创建的
我将解决方案和项目升级到Visual Studio 2012和WiX 3.7(仍然针对.NET v4),但由于bootstraper错误,我的安装项目无法构建。
在我的项目文件中,我有以下声明的
<!-- 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 ==========
有什么想法吗? 包裹位置有效,我验证了它的存在....
答案 0 :(得分:0)
我能够部分地解决它,我可以让我的设置构建,但哦这是多么痛苦;)
这是我做的:
Packages/<package_name>/
文件夹中。/Packages/<package_name>/
文件夹(不是/Packages/<package_name>/en/
)/Packages/<package_name>/Product.xml
文件中的下载链接,而不是/Packages/<package_name>/en/Package.xml
Windows Installer 4.5就是这种情况(只有/ en /子文件夹,这可能是原因)在Visual Studio WiX项目中,2个依赖项旁边仍然有黄色三角形(警告?)图标。 点击后,我收到一个缺少依赖关系的错误,尽管所有内容都没有问题。