我正在尝试使用 VS2012 中的 WIX 工具集 3.7 为我的 WFC 服务创建安装程序。所有服务都具有相同的结构:
service.svc
只是链接到特定的类
<%@ ServiceHost Language="C#" Debug="true"
Service="LandwehrServices.Service.Vorlage.ServiceOption"
Factory="ServiceCreator.DigestAuthenticationHostFactory" %>
dll 正在正确安装,但所有文件夹都包含相同service.svc
的(第一个安装的服务的)文件...
这是我的Product.wxs
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="020f2a79-d085-4c05-b49d-a09300e8a144"
Name="!(loc.ProductName)"
Language="1031"
Version="1.0.0.0"
Manufacturer="!(loc.CompanyName)"
UpgradeCode="a0bbe6c8-1658-43e4-9cf8-51d6bbdf84d2">
<Package InstallerVersion="200" Compressed="yes"
Languages="!(loc.LANG)"
Manufacturer="!(loc.CompanyName)" Comments="!(loc.Comments)"
Description="!(loc.Description)" Keywords="!(loc.Keywords)"/>
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLLOCATION" Name="!(loc.ProductName)">
<Directory Id="INSTALLLOCATION.Option" Name="Service.Option" />
<Directory Id="INSTALLLOCATION.Personal" Name="Service.Personal" />
<Directory Id="INSTALLLOCATION.Postbox" Name="Service.Postbox" />
</Directory>
</Directory>
</Directory>
<Feature Id="ProductFeature" Title="!(loc.ProductName)" Level="1">
<ComponentGroupRef Id="Option_Project" />
<ComponentGroupRef Id="Personal_Project" />
<ComponentGroupRef Id="Postbox_Project" />
</Feature>
</Product>
</Wix>
而我BeforeBuild
在.wixdproj
<Target Name="BeforeBuild">
<MSBuild Projects="%(ProjectReference.FullPath)"
Targets="Package"
Properties="Configuration=$(Configuration);Platform=AnyCPU"
Condition="'%(ProjectReference.WebProject)'=='True'" />
<ItemGroup>
<LinkerBindInputPaths Include="%(ProjectReference.RootDir)%(ProjectReference.Directory)obj\$(Configuration)\Package\PackageTmp\" />
</ItemGroup>
<HeatDirectory OutputFile="%(ProjectReference.Filename).wxs"
Directory="%(ProjectReference.RootDir)%(ProjectReference.Directory)obj\$(Configuration)\Package\PackageTmp\"
DirectoryRefId="INSTALLLOCATION.%(ProjectReference.Filename)"
ComponentGroupName="%(ProjectReference.Filename)_Project"
AutogenerateGuids="true" SuppressCom="true" SuppressFragments="true" SuppressRegistry="true"
SuppressRootDirectory="true" ToolPath="$(WixToolPath)" Condition="'%(ProjectReference.WebProject)'=='True'" />
</Target>
有任何想法吗?这是我第一次使用 WIX...