Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <#@ template debug="false" hostspecific="true" language="C#" #>
- <#@ include file="GetFiles.ttinclude" #>
- <#@ output extension=".wxi" #>
- <#@ import namespace="System" #>
- <#@ import namespace="System.Collections.Generic" #>
- <#@ import namespace="System.Text" #>
- <#@ import namespace="System.IO" #>
- <?xml version="1.0" encoding="utf-8"?>
- <#
- GetFiles(Path.GetDirectoryName(Host.TemplateFile) + @"\..\MyApp\bin\Release", new List<string>( new string[]{"pdb"}) );
- //generate components
- #>
- <Include>
- <DirectoryRef Id="APPLICATIONROOTDIRECTORY">
- <#
- foreach(string f in files)
- {
- string fileName = System.IO.Path.GetFileName(f);
- #>
- <Component Id="<#=FileToId(fileName)#>" Guid="<#=Guid.NewGuid().ToString()#>">
- <File Id="<#=fileName#>" Source="<#=f#>" KeyPath="yes" Checksum="yes"/>
- </Component>
- <#
- }
- #>
- </DirectoryRef>
- <!-- Step 3: Tell WiX to install the files -->
- <Feature Id="MainApplication" Title="My App" Level="1">
- <#
- foreach(string f in files)
- {
- string fileName = System.IO.Path.GetFileName(f);
- #>
- <ComponentRef Id="<#=fileName#>" />
- <#}#>
- </Feature>
- </Include>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement