【发布时间】:2013-10-22 10:33:11
【问题描述】:
我正在尝试使用 VS2012 中的 WIX Toolset 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>
还有我在.wixdproj 中的BeforeBuild 条目
<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...
【问题讨论】:
-
...\Mobile\Service.Personal\obj\Debug\Package\PackageTmp的源文件包含正确的代码。如果我将service.svc重命名为servicePersonal.svc之类的个人名称,它就可以正常工作。安装过程中是否有临时目录用于复制文件?
标签: c# wcf visual-studio-2012 wix wix3.7