[wix-devs] Regarding MSBuild Macros

Kaveesh Dashora kaveeshd at gmail.com
Thu Apr 14 02:53:45 PDT 2022


Hi Devs,

I am writing here in regards to a NON WIX question albeit a MSBuild
question. I see that you guys have implemented Pre and Post Build
events for WiX. And have a question regarding the same.

I am working on adding PreBuild and PostBuild Events for my custom
project type in VIsual Studio.
WIth that I am also working on adding Macros.

When I try to read the PreBuild and PostBuild strings containing my
custom Macros. They are automatically evaluated to empty strings. I
believe that is happening because I have not defined my custom Macros
in my msbuild targets. I tried resolving this by adding a msbuild task
which runs before the PreBuild Event, but to no avail. The evaluated
strings were still coming empty.

I am currently having a hard time figuring out where to place my
msbuild which adds my custom macros with their values to MSBuild so
that they get evaluated while MSBuild reads the Pre and Post Build
Events from the project file.

--
Kaveesh


More information about the wix-devs mailing list