XPath in MSBuild (SDC) and WIX -


The latest question of this question ->

I have a WIX file that I would like to use MSBuild is required . It starts like this:

  & lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Wix xmlns = "http://schemas.microsoft.com/wix/2006/wi" xmlns: iis = "http://schemas.microsoft.com/wix/IIsExtension" & gt; & Lt ;? - .. Various deleted paras ... ... - & gt; & Lt; Product ID = '$ (var.ProductCode)' upgrade code = '$ (var.UpgradeCode)' name = '$ (var.AppName)' language = "1033" version = '$ (var.ProductVersion)' creator = '$ (Var.manufacturer)' & gt; & Lt; Package ID = '$ (var.PackageCode)' InstallerVersion = "200" Compressed = "Yes" /> & Lt ;? - ... more WIX XML file ... - & gt; & Lt; Iis: Web applications id = 'STBLIPP' name = 'MyWebSite' isolation = 'Medium' /> & Lt ;? - The rest of the WIX XML file ...-- & gt;  

My problem is that SDC works are not able to reference any XML nodes that are related to WIX. For example:

  & lt; XmlFile.SetAttribute path = "$ (MSBuildProjectDirectory) \ TestProduct.wxs" XPath = "//IIS: Web application" namespace = "@ (namespace)" name = "name" value = "$ (version tag)" />  

works just fine because it does not use any Wix nodes (only one IIS), but if I use it full XPath path ( / wix / Product / iis: Web applications ) Returns the job: Resource string could not be found, no match for XPath expression

This is not a problem unless I came across a directory node (/ wix / product / directory / directory / directory / directory [@ id = 'STWebSiteDir'])

I got full XPath and low / directory [@ D = 'STWebSiteDir'] I've tried single quotes and double quotes, I have tried to add the WIX namespace to call (with no prefix).

  & gt; Item group & gt; & Lt; Include namespace = "http://schemas.microsoft.com/wix/IIsExtension" & gt; & Lt; Prefix & gt; IIS & lt; / Prefix & gt; & Lt; Uri & gt; Http: //schemas.microsoft.com/wix/IIsExtension< / Uri & gt; & Lt; / Namespace & gt; & Lt; Include namespace = "http://schemas.microsoft.com/wix/2006/wi" & gt; & Lt; Prefix & gt; & Lt; / Prefix & gt; & Lt; Uri & gt; Http: //schemas.microsoft.com/wix/2006/wi< / Uri & gt; & Lt; / Namespace & gt; & Lt; / ItemGroup & gt;  

I still tried to get context for / wix / product and also fails:

    

I am clearly missing something, anybody indicates that where does it go to work?

wiki

Can you define variables on the command line only to the preprocessor Are you

  Candle -dVariableName = ValueForVariable  

This can be very easy.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -