binary - WiX - 如何创建 bin 子目录?

标签 binary wix wix3

我错过了一些明显的东西。您如何将 .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 和 name 属性上,但它不喜欢(无效字符)。

另外,对于 IIS,最佳做法是安装在 c:\program 文件中还是 c:\inetpub\wwwroot 中?如何将默认目录切换到 c:\inetpub\wwwroot\myproj?

这些是我对 WiX 的各种第一次实验。

最佳答案

每个标签创建一个新目录。对于每个嵌套标签,都有一个新目录。因此,如果您想在 INSTALLLOCATION 下有一个“bin”,请使用如下所示。

<Directory Id="INSTALLLOCATION" Name="TFBIC.RCT.WCFWebServicesWIXSetup"> 
    <Directory Id="BinFolder" Name="bin"> 
        <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>

关于binary - WiX - 如何创建 bin 子目录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2051928/

相关文章:

binary - 十进制数 104 的二进制等价物

wix - 在我基于WiX的MSI项目中,为什么ICE24告诉我 '2014.1.1.4'是无效的版本字符串?

msbuild - 使 WIX 安装程序将文件放置在 AppData 中

windows - 使用wix复制目录结构

resources - 从 Wix 中的附属程序集读取字符串资源?

c++ - 使用流运算符将具有整数值的类保存到二进制文件中 >>/<<

c - 使用十六进制编辑器修改库中的 env 变量名称?

c++ - 包装二进制缓冲区 - 可能没有多余的移动/复制?

installation - WIX 安装程序 - 将变量传递到下一个窗口