Hy,
when i'm trying to use the TemplateFile extension i'm getting the following error while installing the msi (msi log file):
TemplateFiles_Deferred: [TemplateFiles_Deferred] std::exception: 0x80070002 - Error getting file attributes of Reporting.cfg: The system cannot find the file specified.
MSI (s) (BC!3C) [12:55:02:217]: Closing MSIHANDLE (1752) of type 790531 for thread 5180
CustomAction TemplateFiles_Deferred returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (BC:44) [12:55:02:218]: Closing MSIHANDLE (1749) of type 790536 for thread 5464
Action ended 12:55:02: InstallFinalize. Return value 3.
MSI (s) (BC:58) [12:55:02:224]: User policy value 'DisableRollback' is 0
MSI (s) (BC:58) [12:55:02:224]: Machine policy value 'DisableRollback' is 0
Here is a copy of my wix component definition:
<Component Id="ReportingConfigFile" Guid="2232F8FA-5C46-4423-BFA3-43C0F5EAE18F">
<File Id="Reportingcfg" Name="Reporting.cfg" Source="$(var.Reporting.TargetDir)config\Reporting.cfg.template" KeyPath="yes"/>
<SystemTools:TemplateFile Id="ChangeReportingConfigFile" Source="[#Reportingcfg]" Target="[#Reportingcfg]" ExecuteOnInstall="yes">
<SystemTools:TemplateFileProperty Id="DB_DATA_SOURCE_NAME_property2" Name="DB_DATA_SOURCE_NAME" Value="[DB_DATA_SOURCE_NAME]"/>
<SystemTools:TemplateFileProperty Id="DB_AC_USERE_property2" Name="DB_AC_USER" Value="[DB_AC_USER]"/>
<SystemTools:TemplateFileProperty Id="DB_AC_PWDE_property2" Name="DB_AC_PWD" Value="[DB_AC_PWD]"/>
<SystemTools:TemplateFileProperty Id="DB_PROVIDER_NAME_property2" Name="DB_PROVIDER_NAME" Value="[DB_PROVIDER_NAME]"/>
<SystemTools:TemplateFileProperty Id="DB_INSTANCE_property2" Name="DB_INSTANCE" Value="[DB_INSTANCE]"/>
<SystemTools:TemplateFileProperty Id="REPORTSAPPDATA_property" Name="REPORTSAPPDATA" Value="[REPORTSAPPDATA]"/>
</SystemTools:TemplateFile>
</Component>
Without the TemplateFile extension the file Reporting.cfg is copied to the correct location.
Can aony one help me?