C#C
C#2y ago
ascpixi

✅ Evaluating arbitrary XML in MSBuild?

Hi all! :cathi:
Is there any way to evaluate some arbitrary XML in MSBuild - similarly to how you'd do it with <Import>, just without the need for a file? My use case is that I want to call into a script, e.g. python supply-props.py, which will supply dynamically-generated properties, targets, etc., based on a more sane build DSL, and then import those from the string that Exec returns.

I know that I can write the output to a temporary file and then <Import> it, but doing it in-memory without the need for that would be much more elegant.

Thanks in advance! :catlove:
Was this page helpful?