简体   繁体   English

MSBuild目标-解决方案构建/重建之后

[英]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.

相关问题 MSBuild AfterPublish目标 - MSBuild AfterPublish Target 使用MSBuild,如何从命令行构建MVC4解决方案(在此过程中应用Web.config转换)并输出到文件夹? - Using MSBuild, how do I build an MVC4 solution from the command line (applying Web.config transformations in the process) and output to a folder? MSBuild解决方案命令行输出到各个文件夹 - MSBuild solution command line output to individual folders 部署用于多点Sharepoint解决方案的解决方案MSBuild脚本 - Deploy solution MSBuild script for multilpe Sharepoint solutions Teamcity MSBuild将构建输出复制到新文件夹 - Teamcity MSBuild Copy build output to new folder 如何阻止MSBuild _WPPCopyWebApplication目标清理App_Data文件夹 - How to stop MSBuild _WPPCopyWebApplication target cleaning App_Data folder 使用MSBuild部署某个构建质量的最新版本 - Use MSBuild to deploy latest build of a certain build quality MSBuild:Web应用程序,构建一次打包并部署许多 - MSBuild: Web application, build once package and deploy many Build C#.NET 3.5项目因psake失败,但因msbuild成功 - Build C# .NET 3.5 project fails with psake but succeeded with msbuild 有没有一种方法可以在单个版本上使用msbuild创建多个部署? - Is there a way to create more than one deployment with msbuild on a single build?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM