문제

이 질문에 대한 새로운 질문->

MSBuild를 사용하여 수정 해야하는 Wix 파일이 있습니다. 다음과 같이 시작합니다.

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension">

  <?--... Various Removed Params ...-->

  <Product Id='$(var.ProductCode)'
    UpgradeCode='$(var.UpgradeCode)'
    Name='$(var.AppName)' Language="1033" Version='$(var.ProductVersion)'
    Manufacturer='$(var.Manufacturer)'>
    <Package Id='$(var.PackageCode)' InstallerVersion="200" 
    Compressed="yes" />

  <?--... More of the WIX XML file ...-->

  <iis:WebApplication Id='STWebApp' Name='MyWebSite' Isolation='medium' />

  <?--... Rest of the WIX XML file ...-->

내 문제는 SDC 작업이 WIX 관련 XML 노드를 참조 할 수없는 것 같습니다. 예를 들어:

<XmlFile.SetAttribute Path="$(MSBuildProjectDirectory)\TestProduct.wxs"
         XPath="//iis:WebApplication" Namespaces="@(Namespaces)" 
         Name="Name" Value="$(VersionTag)"/>

Wix 노드 (IIS 노드 만 사용하지 않음)를 사용하지 않기 때문에 잘 작동하지만 전체 XPath 경로를 사용하는 경우 (/wix/product/iis : 웹 application) 작업이 반환됩니다. 자원 문자열을 찾을 수 없음 XPath 표현식에 대해 찾은 일치하지 않습니다.

디렉토리 노드 (/wix/product/directory/directory/directory/directory [@id = 'stwebsitedir']를 참조하려면 문제가되지 않습니다.

전체 xpath와 짧은 // 디렉토리 [@id = 'stwebsitedir']를 사용해 보았습니다. 나는 단일 따옴표와 이중 인용문을 시도했습니다. 통화에 wix 네임 스페이스를 추가하려고 시도했습니다 (접두사가 없음).

<ItemGroup>
  <Namespaces Include="http://schemas.microsoft.com/wix/IIsExtension">
    <Prefix>iis</Prefix>
    <Uri>http://schemas.microsoft.com/wix/IIsExtension</Uri>
  </Namespaces>
  <Namespaces Include="http://schemas.microsoft.com/wix/2006/wi">
    <Prefix></Prefix>
    <Uri>http://schemas.microsoft.com/wix/2006/wi</Uri>
  </Namespaces>
</ItemGroup>

나는 심지어 /wix /제품에 대한 참조를 얻으려고 노력했지만 심지어 실패합니다.

<XmlFile.SetAttribute Path="$(MSBuildProjectDirectory)\TestProduct.wxs" 
            XPath="/Wix/Product" Namespaces="@(Namespaces)" 
            Name="Name" Value="MODIFIED"/>

나는 분명히 뭔가를 놓치고있다. 이것을 어디로 가야하는지 힌트가있는 사람이 있습니까?

백 카노

도움이 되었습니까?

해결책

명령 줄의 변수를 사전 처리기에 정의 할 수 있습니까?

candle -dVariableName=ValueForVariable

훨씬 쉬울 수 있습니다.

다른 팁

@(네임 스페이스)에 Wix 기본 네임 스페이스를 포함 시켰습니까?

<ItemGroup>
  <Namespaces Include="http://schemas.microsoft.com/wix/IIsExtension">
    <Prefix>iis</Prefix>
    <Uri>http://schemas.microsoft.com/wix/IIsExtension</Uri>
  </Namespaces>
  <Namespaces Include="http://schemas.microsoft.com/wix/2006/wi">
     <Prefix>wis</Prefix>
    <Uri>http://schemas.microsoft.com/wix/2006/wi</Uri>
  </Namespaces>
</ItemGroup>

WI 네임 스페이스에 대한 접두사를 추가해야합니다. 그 후에는 괜찮을 수 있습니다.

자, 여기에 답이 있습니다.

Wix 부품에 대해 누락 된 네임 스페이스 접두사는 비어있는 것이 아니라

<ItemGroup>
  <Namespaces Include="http://schemas.microsoft.com/wix/IIsExtension">
    <Prefix>iis</Prefix>
    <Uri>http://schemas.microsoft.com/wix/IIsExtension</Uri>
  </Namespaces>
  <Namespaces Include="http://schemas.microsoft.com/wix/2006/wi">

    <Uri>http://schemas.microsoft.com/wix/2006/wi</Uri>
  </Namespaces>
</ItemGroup>

그런 다음 파일의 Wix 네임 스페이스에 접두사 값을 추가해야합니다. 나는 TST를 사용했다.

백 카노

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top