-
I am installing 9 Windows services from one WiX4 built installer. Each of the services has a file called 'nlog.config'. When I run the installer MSI, I get the services installed properly in the desired directories, but the nlog.config that is placed in each service directory is the nlog.config from the first service. It would be easy for me to give a unique name to each nlog.config and if that is the preferred route it isn't an issue, just a couple minutes of very minor code changes.
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
We'll need more specifics about how the files are laid out exactly. Of course, you can't install the same filename to the same directory, but it isn't clear what your code is now or what you are trying to accomplish otherwise (I could make a few different guesses). |
Beta Was this translation helpful? Give feedback.
-
I start by harvesting each service:
I then create a directory structure:
I then create the services:
And I install the services:
The services end up in "Program Files\Optimium Health\CommunicationService" with a distinct directory for each service. |
Beta Was this translation helpful? Give feedback.
-
@robmen
The first two services have the following harvest entries for nlog.config:
Does any of this help diagnose what I am seeing? |
Beta Was this translation helpful? Give feedback.
-
Your harvested .wxs files take the files from SourceDir, which goes to the first matching file in current folder or in the unnamed bind paths.
and define the preprocessor variable to the compiler:
That of course should be done for each of the harvested fodlers |
Beta Was this translation helpful? Give feedback.
-
@nirbar
and then added to the two harvest directives:
There is no difference in the generated harvest files and no change in the copied nlog.config. |
Beta Was this translation helpful? Give feedback.
Your harvested .wxs files take the files from SourceDir, which goes to the first matching file in current folder or in the unnamed bind paths.
You should add a preprocessor variable to the harvesting item metadata
and define the preprocessor variable to the compiler:
That of course should be done for each of the harvested fodlers