It works this way in pure Microsoft-Solutions.
Post-Build-Stuff:
If there is no other chance, i have to get this running. For my first try, i wrote this “script” into the textbox in the “Post-Build Event Command Line”-dialog.
echo $(ConfigurationName) >> text.txt
This added the following to the elements-file:
<PropertyGroup>
<PostBuild Condition="'$(Platform)' == 'Echoes'" Platform="Echoes">echo $(ConfigurationName) >> text.txt</PostBuild>
</PropertyGroup>
Building the solution failes…
1>------ Build started: Project: Application2, Configuration: Debug ------
1>Unhandled Exception:The attribute "Platform" in element <PostBuild> is unrecognized. D:\Entwicklung\PoC\Application2\Application2.elements
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
If i remove the “Platform” attribute, the build succeeds and the script seem to be executed, but the Macros doesn’t seem to work.
|1>|| -> Task RemObjects.EBuild.Elements.ElementsProjectPostBuildTask started for Application2.|
|1>|| |
|1>|| D:\Entwicklung\PoC\Application2>echo 1>>text.txt |
|1>|| <- Task RemObjects.EBuild.Elements.ElementsProjectPostBuildTask finished for Application2, took 0,0356s (0.035s).|
Also, the Post-build Event dialog (invoked via the button at the Project-properties isn’t populated with the script content any longer. And i am not sure about the drop-down-list in this dialog…
(The drop-down seems to be correctly populated if i readd the Platform attribute - the whole dialog isn’t working properly if the attribute is removed. The options seem to have no effect, changes are not reflected in the elements file…)
Conclusion: If the “Platform Attribute” is included, the dialog seems to work, but the build doesn’t. If you delete it, it’s the other way around - but then the macros don’t work.
Sorry for the messy post, i edited it along testing. 