无法建立WixStdBootstrapperApplication-出现错误"C:\ tools \ WixBuild.props";没找到 [英] Unable to build WixStdBootstrapperApplication - get error "C:\tools\WixBuild.props" was not found

查看:140
本文介绍了无法建立WixStdBootstrapperApplication-出现错误"C:\ tools \ WixBuild.props";没找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试对WixStandardBootstrapperApplication.cpp进行更改,并根据

I am trying to make changes to the WixStandardBootstrapperApplication.cpp and generate a dll as per the suggestion from this link. I have downloaded the wix310-debug source and am modifying the file present under wix310-debug\src\ext\BalExtension\wixstdba\ location. There is a wixstdba.vcxproj file under this location which I am trying to open using Visual Studio 2012. Whenever I try to do that I get the error:

Unable to read the project file "wixstdba.vcxproj". The imported project "C:\tools\WixBuild.props" was not found.

我不确定该怎么做才能更正此问题.另外,基于引用的链接,我认为我正在更新正确的文件,但如果不是这样,请告诉我.在这方面的任何帮助将是巨大的.提前致谢.

I am not sure what should I do to correct this. Also, based on the referenced link, I think I am updating the correct file but let me know if that is not the case. Any help in this would be great. Thanks in advance.

推荐答案

在您的vcxproj中,有这样一行:

In your vcxproj there's a line like this:

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />

调试源实际上不是wix的源.它包含所有wix源文件,但实际上不是可构建的.该zip包含所有内置的pdb,仅用于调试.

The debug source isn't really the source of wix. It includes all the wix source files but it is not really buildable. This zip has all the built pdbs and is used to debug only.

您想从 wixtoolset的github 下载wix源,以便构建wixstdba .但是,这当前是针对3.10.3版本的,可能具有一些特定于版本的更改,但是使用此引擎针对wix 3.10.2构建的dll,我看不到任何问题,因为引擎和引导程序的应用程序界面应该保持不变.

You want to download the wix source from wixtoolset's github so that you can build wixstdba. But, this is for version 3.10.3 currently and may have some version specific changes but I don't see anything that would be an issue using the dll built here against wix 3.10.2 since the engine and bootstrapper application interfaces should have remained the same.

但是,您应该能够仅使用WixStdBA项目 构建所有这些内容.您将必须复制wixstdba文件夹.编辑vcxproj并删除上面提到的导入行(它应该在底部附近).

But, you should be able to build all this with only the WixStdBA project. You will have to copy over the wixstdba folder. Edit the vcxproj and remove the import line mentioned above (it should be near the bottom).

现在,将此项目添加到您的新解决方案或Visual Studio中的安装程序解决方案中.我们需要添加其他包含和库目录.所有这些包含目录都将位于您的wix安装位置(默认C:\ Program Files(x86)\ WiX Toolset v3.10)中,在属性"->"C/C ++"->常规"->其他包含目录"中添加您的wix SDK包含路径.如果您使用的是Visual Studio 2013,则可以使用完整路径,也可以使用"$(WIX)\ SDK \ vs2013 \ inc". $(WIX)应该引用WIX环境变量,该变量指向在安装wix时添加的安装目录.如果您要在安装了wix的构建系统上构建,这应该是更好的选择,因为不同计算机上的位置可能不同.

Now, add this project to your a new solution or your installer solution in visual studio. We need to add addition include and library directories. All these include directories will be in your wix install location (default C:\Program Files (x86)\WiX Toolset v3.10) In Properties -> C/C++ -> General -> additional include directories add your wix SDK include path. If you are using visual studio 2013 you can use the full path or you can use "$(WIX)\SDK\vs2013\inc". $(WIX) should reference the WIX environment variable which points to the install directory which is added when installing wix. This should be the better option if you will be building on a build system with wix installed since the location may be different across machines.

现在,对于其他库目录,我们转到属性->链接器->常规->其他库目录,并添加正确的lib路径.如果使用的是Visual Studio 2013,则要放入$(WIX)\ SDK \ vs2013 \ lib \ x86.最后,我们需要引用构建引导程序dll所需的库.在链接器->输入->其他依赖项下,添加"dutil.lib; balutil.lib".我的其他依赖项还有很多东西,我不记得默认情况下是否存在.无论如何,这是我的所有其他依赖关系

Now for addition library directories, we go to the Properties -> Linker -> General -> Additional Library Directoryes and add in the correct lib path. If you are using visual studio 2013 you want to put in $(WIX)\SDK\vs2013\lib\x86. Finally we need to reference the libs that are needed to build the bootstrapper dll. Under Linker -> Input -> Additional Dependencies, add in "dutil.lib;balutil.lib". My additional dependencies has a lot more stuff and I don't remember if it was by default there. Here's my Additional Dependencies in full anyways

dutil.lib;balutil.lib;advapi32.lib;comctl32.lib;comdlg32.lib;gdi32.lib;gdiplus.lib;kernel32.lib;msimg32.lib;odbc32.lib;odbccp32.lib;ole32.lib;oleaut32.lib;shell32.lib;shlwapi.lib;user32.lib;uuid.lib;wininet.lib;winspool.lib;version.lib;%(AdditionalDependencies)

有了这个,您应该能够构建wixstdba项目并获得一个dll.在不编辑任何代码的情况下,这应该与包含的wixstdba.dll完全相同.

With this you should be able to build the wixstdba project and get a dll built. Without editing any code this should be the exact same as the wix included wixstdba.dll.

您可以尝试引用此dll而不是包含的wix(必须定义自己的BootstrapperApplication而不是使用wix之一的BootstrapperApplicationRef),也可以仅将此dll放入wix位置的bin中.

You could try referencing this dll instead of the wix included one (have to define your own BootstrapperApplication instead of using the BootstrapperApplicationRef to one of the wix ones) or just drop in this dll into your wix location's bin.

这篇关于无法建立WixStdBootstrapperApplication-出现错误"C:\ tools \ WixBuild.props";没找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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