You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which for Some Reasons™ defines a different set of paths for CI and local builds. It looks like this in my v4 project:
<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
<?warning This is NOT a CI build (local?)?>
<?define FooSource = "SourceDir"?> <!-- in the .Local variant. In the .CI variant it's an absolute path -->
</Include>
The component then is using the WiX4 style heat based harvesting to generate a huge file, with gazillion entries that look like
.. and that works fine for CI and local builds. $(FooSource) is either a full path or it is 'SourceDir' which to me is undocumented black magic that just works and fishes the files from the project references and their output folders.
Now I wanted to cut down on these auto-generated files and use the new WiX 5 features. My naive attempt looked like this (relevant snippet):
<Fragment>
<?include SourcePaths.wxi?>
<ComponentGroup Id="foofiles">
<Files Include="$(FooSource)\**">
<!--
Don't harvest the service because it needs manual authoring (below).
-->
<Exclude Files="$(FooSource)\foo-service.exe" />
</Files>
which I was hoping to be a drop-in replacement for the working WiX 4 version. But unfortunately this warns me during build-time:
warning WIX8601: Missing directory for harvesting files: Could not find a part of the path 'D:\Foo\FooInstaller\SourceDir'
which is .. unsurprising. That takes SourceDir literally and that directory doesn't exist. Is there a way to make this work or am I stuck with the WiX4 way of manually generating my files with heat and then manually editing them (say to exclude the service etc etc)? Where did my SourceDir magic go?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Disclaimer: I accept that I have trouble navigating the docs at times and don't do MSIs for a living.
I have a solution with a bunch of projects, one being the Installer and one - for the sake of this discussion - a windows service Foo.
In my installer project I have a file like this
which for Some Reasons™ defines a different set of paths for CI and local builds. It looks like this in my v4 project:
The component then is using the WiX4 style heat based harvesting to generate a huge file, with gazillion entries that look like
.. and that works fine for CI and local builds.
$(FooSource)
is either a full path or it is 'SourceDir' which to me is undocumented black magic that just works and fishes the files from the project references and their output folders.Now I wanted to cut down on these auto-generated files and use the new WiX 5 features. My naive attempt looked like this (relevant snippet):
which I was hoping to be a drop-in replacement for the working WiX 4 version. But unfortunately this warns me during build-time:
which is .. unsurprising. That takes
SourceDir
literally and that directory doesn't exist. Is there a way to make this work or am I stuck with the WiX4 way of manually generating my files with heat and then manually editing them (say to exclude the service etc etc)? Where did my SourceDir magic go?Beta Was this translation helpful? Give feedback.
All reactions