Skip to content

Conversation

@kpreisser
Copy link
Contributor

@kpreisser kpreisser commented Nov 11, 2022

Run the template commands (dotnet tool t4, introduced with #163) only once when building the project.
Otherwise, the commands would be run one time for each target framework (netstandard2.1 and net6.0), which can sometimes cause file lock errors (and can degrade performance).

This is based on this StackOverflow answer: https://stackoverflow.com/questions/50071932/how-do-i-call-my-script-before-all-the-builds-for-only-once-in-a-multi-targeting/50080946#50080946 (similar to the existing target that downloads the wasmtime binary).

Thank you!

Otherwise, the commands would be run for each target framework, which sometimes could cause file lock errors (and degrades performance).

This is based on this StackOverflow answer: https://stackoverflow.com/questions/50071932/how-do-i-call-my-script-before-all-the-builds-for-only-once-in-a-multi-targeting/50080946#50080946
@peterhuene peterhuene merged commit 44ca7ee into bytecodealliance:main Nov 12, 2022
@kpreisser kpreisser deleted the run-template-commands-once branch November 12, 2022 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants