$(TargetPath) is empty is PostBuidEvent in Bundle project (Wix 4.0.1) #7618
-
I know there are numerous posts on StackExchange about I have read some older comment to use What am I missing to have
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Any ideas about this or is it a bug? |
Beta Was this translation helpful? Give feedback.
-
Others have already hit this, solutions discussed here (I think) and HeatWave has special case to migrate it. You need to explicitly import the SDK.props/targets and place your usage of TargetDir after the last import. This is an MSBuild behavior. PostBuildEvent is an anachronism in Sdk-style projects, recommendation is to move to explicit Target instead. |
Beta Was this translation helpful? Give feedback.
-
Thanks. I found this in an earlier post https://github.com/orgs/wixtoolset/discussions/7393 But this introduces a different issue - I had overridden the output filename (different to the project name) and when I import the sdks, the output is the project name - so where do I now set the output file name? |
Beta Was this translation helpful? Give feedback.
-
For anyone finding this here is an example of a working project file. Of note,
|
Beta Was this translation helpful? Give feedback.
Others have already hit this, solutions discussed here (I think) and HeatWave has special case to migrate it.
You need to explicitly import the SDK.props/targets and place your usage of TargetDir after the last import. This is an MSBuild behavior.
PostBuildEvent is an anachronism in Sdk-style projects, recommendation is to move to explicit Target instead.