[英]MSBuild Target - After Solution Build / Rebuild
What way should I go when I want to build some projects and afterwards I want to do some extra stuff? 当我要构建一些项目,然后又要做一些额外的事情时,我应该走什么路? Some kind of finalizing the build.
完成构建的某种方式。
I need a target that executes just after the last project was build (Rebuild All Succeeded). 我需要一个在生成最后一个项目(重新生成所有成功)之后立即执行的目标。 In that target, some Files including a deployment guide (.docx), some SQL scripts and PowerShell are moved / copied into a predefined directory hierarchy.
在该目标中,某些文件(包括部署指南(.docx),一些SQL脚本和PowerShell)被移动/复制到预定义的目录层次结构中。 I already build WSPs and other files that get copied to their destination, but not those "global files".
我已经建立了WSP和其他复制到其目的地的文件,但没有复制那些“全局文件”。
I thought of the way that after the last project in the build order was build, I can trigger that target, but what if in the future the build order will change? 我想到了在构建顺序中的最后一个项目构建之后,可以触发该目标的方式,但是如果将来构建顺序会改变,该怎么办?
Is there a "AfterRebuildAll" Target or some best practise? 是否有“ AfterRebuildAll”目标或某些最佳实践?
If you're building with TFS, there are customizable TFS build targets . 如果您正在使用TFS进行构建 ,则可以自定义TFS构建目标 。
If you're building with msbuild.exe from the CLI, you can look into placing an "after.solutionfile.sln.targets" msbuild project file in the same folder as your solution that contains your custom targets . 如果要通过CLI使用msbuild.exe进行构建,则可以考虑将“ after.solutionfile.sln.targets” msbuild项目文件放置在与包含自定义目标的解决方案相同的文件夹中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.