WiX(Votive)项目参考收获(HEAT)一个 ASP.Net Web 应用程序
我在做什么
我在 Visual Studio 2010 中有一个 ASP.Net Web 应用程序和一个 WiX 安装项目。我可以使用以下 HEAT 命令集显式获取 Web 应用程序作为预构建事件设置项目:
“%WIX%\bin\heat.exe”项目“$(SolutionDir)Application.WebUI\Application.WebUI.vbproj”-o“$(ProjectDir)ProjectOutputContent.wxs”-pog Content -ag -模板片段- nologo -directoryid RUNTIMEFOLDER
“%WIX%\bin\heat.exe”项目“$(SolutionDir)Application.WebUI\Application.WebUI.vbproj”-o“$(ProjectDir)ProjectOutputBinariesAndSymbols.wxs”-pog 二进制文件 -pog 符号 -ag -模板片段-nologo-directoryid BINFOLDER
请记住,RUNTIME 文件夹和 BINFOLDER 是我在主产品 WXS 文件中以声明方式设置的目录。
为什么我不喜欢它
这种方法很烦人,因为我需要在构建安装项目之前签出 HEAT 生成的片段 WXS 文件。另一个考虑因素是它是一个 Web 应用程序,我需要将二进制文件和符号放入与内容不同的目录 (bin) 中。
我的目标
我宁愿使用 Wix 设置项目中的项目引用,并将 Harvest 属性设置为 True。然后,我可以收获 BinariesContentSatellites 以获取片段中所需的项目,然后设置一个可以在主产品 WXS 中引用的目录 ID。问题是,这会将内容、二进制文件和符号放在同一个文件夹中,而我需要将后两个放在嵌套的 bin 文件夹中。我无法两次添加此项目参考,每次都有不同的收获选项。
我的问题
有没有办法做我想做的事情或者我需要继续进行预构建活动?顺便说一句,我考虑过在没有构建事件的情况下手动收集片段一次,然后根据需要重新收集。我宁愿避免这种方法。
What I'm Doing
I have an ASP.Net Web Application and a WiX Setup Project in Visual Studio 2010. I can explicitly harvest the web application with the following HEAT command set as a pre-build event for the setup project:
“%WIX%\bin\heat.exe” project "$(SolutionDir)Application.WebUI\Application.WebUI.vbproj" -o "$(ProjectDir)ProjectOutputContent.wxs" -pog Content -ag -template fragment -nologo -directoryid RUNTIMEFOLDER
“%WIX%\bin\heat.exe” project "$(SolutionDir)Application.WebUI\Application.WebUI.vbproj" -o "$(ProjectDir)ProjectOutputBinariesAndSymbols.wxs" -pog Binaries -pog Symbols -ag -template fragment -nologo -directoryid BINFOLDER
Keep in mind that RUNTIME folder and BINFOLDER are directories I declaratively setup in my main product WXS file.
Why I Don't Like It
This approach is annoying because I need the HEAT generated fragment WXS files checked out before I can build the setup project. Another consideration is that it is a web application and I need to drop the binaries and symbols into a different directory (bin) than the content.
What I'm Aiming For
I would rather use a project reference within the Wix Setup Project and simply set the Harvest property to True. I could then harvest the BinariesContentSatellites to get the items I need in my fragment and then set a single Directory Id that I can reference in the main product WXS. The problem is that this will put the content, binaries and symbols in the same folder where I need the latter two in a nested bin folder. I can't add this project reference twice, each with different harvest options.
My Question
Is there a way to do what I'm after or do I need to keep with the pre-build event? As an aside, I have considered manually harvesting the fragment once, without a build event, and then re-harvesting as needed. I would prefer to avoid that approach.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
回答你的主题“为什么我不喜欢它”:我也有同样的问题,但后来我找到了解决方案。您不需要签入片段文件。只需物理添加文件,然后包含在您的项目中
注意:不要从项目中添加片段文件。
Answering your topic "Why I Don't Like It" : I too had same problem but then i found the solution. You dont need to check-in the fragment file. Just add the file physically and then include in your project
Note : Don't add the fragment file from the project.