答案 0 :(得分:3)
根据the documentation,您可以在scripts
部分的project.json
部分中添加命令。
"scripts": {
"precompile": [ "echo before" ],
"postcompile": [ "echo after" ]
}
答案 1 :(得分:0)
这是一个例子:
<Project... >
:
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="echo before" />
</Target>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="echo after" />
</Target>
:
</Project>