0

I have a solution with several projects in it. I have just added a console app as one of the projects. Building the solution correctly places the [ConsoleApp].exe.config in the bin\debug folder. This a fairly old code base and uses wix for msi creation (Not familiar with wix). [ConsoleApp].exe.config is not being deployed to server. How can I get that config included in the msi?

rcurrydev
  • 45
  • 1
  • 10

1 Answers1

1

WiX: Are you sure it is a WiX project? Do you see any *.wxs files? Normally Product.wxs. If it is a WiX project you add a new WiX component to install the file, or you add the file to an existing component. I like to add a new component per file.

<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="ProgramFilesFolder">
    <Directory Id="INSTALLFOLDER" Name="My Folder">

      <!-- Pre-Existing File, mock-up absolute path -->
      <Component Feature="MainApplication" >
        <File Source="C:\MyPath\MyApp.exe" />
      </Component>

      <!-- New File, mock-up absolute path -->
      <Component Feature="MainApplication">
        <File Source="C:\MyPath\MyApp.exe.config " />
      </Component>

    </Directory>
  </Directory>
</Directory>

WiX Crash Course: WiX Quick Start Suggestions and Some Real World Samples.

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • Thanks for your help. You pointed me in the right direction. The following really helped me: http://wixtoolset.org/documentation/manual/v3/howtos/files_and_registry/add_a_file.html – rcurrydev Dec 20 '18 at 18:20