WiX - 如何创建 bin 子目录?
我错过了一些明显的东西。如何将 .dll 放入安装目录下名为“bin”的子目录中?我正在尝试遵循本教程: http://www.tramontana.co.hu/wix/lesson5.php# 5.3 部署 WCF Web 服务。因此,我需要复制 .svc 文件和 .bin 文件以及其他一些文件,但从这两个文件开始。我在 Visual Studio 下使用 Wix 3.5。
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLLOCATION" Name="TFBIC.RCT.WCFWebServicesWIXSetup">
<Component Id="ProductComponent" Guid="E9A375FB-DF6A-4806-8B0B-03BE4A50802F">
<File Id='SVC1' Name='CreateUpdateReturnService.svc' DiskId='1' Source='../TFBIC.RCT.WCFWebServices/CreateUpdateReturnService.svc' />
</Component>
</Directory>
<Directory Id="INSTALLLOCATION" Name="TFBIC.RCT.WCFWebServicesWIXSetup">
<Component Id="ProductComponent" Guid="E9A375FB-DF6A-4806-8B0B-03BE4A50802F">
<File Id='DLL1' Name='TFBIC.RCT.WCFWebServices.dll' DiskId='1' Source='../TFBIC.RCT.WCFWebServices/bin/TFBIC.RCT.WCFWebServices.dll' />
</Component>
</Directory>
</Directory>
<Component Id='TestWebVirtualDirComponent' Guid='9586807E-9065-48e8-8E73-13A9191962E5'>
<iis:WebVirtualDir Id='TestWebVirtualDir' Alias='Test' Directory='InstallDir'
WebSite='DefaultWebSite'>
<iis:WebApplication Id='TestWebApplication' Name='Test' />
</iis:WebVirtualDir>
</Component>
</Directory>
我尝试将 \bin 放在 ID 和名称属性上,但它都不喜欢(无效字符)。
另外,对于 IIS,最佳做法是安装在 c:\program files 还是 c:\inetpub\wwwroot 中?如何将默认目录切换到 c:\inetpub\wwwroot\myproj?
这些是我对 WiX 的首次实验。
I'm missing something obvious. How do you put the .dll's in a subdirectory called "bin" under your install directory? I'm trying to follow this tutorial:
http://www.tramontana.co.hu/wix/lesson5.php#5.3
to deploy a WCF web service. So I need to copy the .svc files and the .bin files, along with a few other, but starting with just these two. I'm using Wix 3.5 under Visual Studio.
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLLOCATION" Name="TFBIC.RCT.WCFWebServicesWIXSetup">
<Component Id="ProductComponent" Guid="E9A375FB-DF6A-4806-8B0B-03BE4A50802F">
<File Id='SVC1' Name='CreateUpdateReturnService.svc' DiskId='1' Source='../TFBIC.RCT.WCFWebServices/CreateUpdateReturnService.svc' />
</Component>
</Directory>
<Directory Id="INSTALLLOCATION" Name="TFBIC.RCT.WCFWebServicesWIXSetup">
<Component Id="ProductComponent" Guid="E9A375FB-DF6A-4806-8B0B-03BE4A50802F">
<File Id='DLL1' Name='TFBIC.RCT.WCFWebServices.dll' DiskId='1' Source='../TFBIC.RCT.WCFWebServices/bin/TFBIC.RCT.WCFWebServices.dll' />
</Component>
</Directory>
</Directory>
<Component Id='TestWebVirtualDirComponent' Guid='9586807E-9065-48e8-8E73-13A9191962E5'>
<iis:WebVirtualDir Id='TestWebVirtualDir' Alias='Test' Directory='InstallDir'
WebSite='DefaultWebSite'>
<iis:WebApplication Id='TestWebApplication' Name='Test' />
</iis:WebVirtualDir>
</Component>
</Directory>
I tried putting \bin on the ID and the name attribute, and it didn't like either (invalid character).
Also, with IIS, is the best practice to install in c:\program files, or in c:\inetpub\wwwroot? How to I switch the default directory to c:\inetpub\wwwroot\myproj?
These are my various first experiments with WiX.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
每个标签都会创建一个新目录。对于每个嵌套标签,都有一个新目录。因此,如果您想在 INSTALLLOCATION 下有一个“bin”,请使用如下所示。
Each tag creates a new directory. For each nested tag, there's a new directory. So, if you want to have a "bin" under INSTALLLOCATION, use like below.