如何创建解决方案预构建 [英] How to create Solution Pre-Build

查看:105
本文介绍了如何创建解决方案预构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个用于预构建事件的进程[例如 - 用于分析项目依赖性]。当我将它用于项目(C#)时,它在Pre-Build事件窗口中查找,如:$(projectDir).. \..\..\..\myProj\production \ ProjectAnalyst。 exe $(ProjectPath)



i希望每个解决方案都使用该exe文件 - 在任何项目构建之前以某种方式添加解决方案的前提条件'ProjectAnalyst.exe '将针对解决方案中的所有项目运行。



我该怎么办?

Hi
i have a process that using for pre-build event [for example - to analysis project dependencies]. when i use it for a project (C#), it's looked in Pre-Build event window like: "$(projectDir)..\..\..\..\myProj\production\ProjectAnalyst.exe $(ProjectPath)"

i want to use that exe file per a solution - to add somehow a precondition to solution that before any project would build, 'ProjectAnalyst.exe' will be run for all projects in solution.

how can i do it?

推荐答案

(projectDir).. \..\ .. \..\myProj\production \ ProjectAnalyst.exe
(projectDir)..\..\..\..\myProj\production\ProjectAnalyst.exe


(ProjectPath)



i想要根据解决方案使用该exe文件 - 以某种方式添加解决方案的前提条件,在任何项目构建之前,将为解决方案中的所有项目运行ProjectAnalyst.exe。



我该怎么办?
(ProjectPath)"

i want to use that exe file per a solution - to add somehow a precondition to solution that before any project would build, 'ProjectAnalyst.exe' will be run for all projects in solution.

how can i do it?


它应该是一个单独的项目。另外,你应该通过Project菜单项下的菜单项将它添加到Project Dependencies主菜单。



或者,您可以学习MSBuild和MSBuild项目的结构,以便能够手动创建自己的项目,超出可用的项目模板。方式,你可以做很多自定义的东西:集成任何第三方工具,并以.NET程序集的形式创建自己的工具,实现speci用于MSBuild任务的al接口,创建集成不同项目构建的主项目,例如解决方案等等。你可以从这里开始:

http://msdn.microsoft.com /en-us/library/vstudio/dd393574.aspx [ ^ ],

http:/ /msdn.microsoft.com/en-us/library/0k6kkbsd.aspx [ ^ ]。



-SA
It should be a separate project. Also, you should add it to the "Project Dependencies" through the menu item found under the "Project" menu item of the main menu.

Alternatively, you can learn MSBuild and the structure of MSBuild project, to be able to create your own projects manually, beyond available project templates. This way, you can do a lot of custom stuff: integrate any 3rd-party tool and create your own, in the form of .NET assemblies implementing special interface for MSBuild tasks, create master projects integrating the build of different items, such as solutions, and a lot more. You can start here:
http://msdn.microsoft.com/en-us/library/vstudio/dd393574.aspx[^],
http://msdn.microsoft.com/en-us/library/0k6kkbsd.aspx[^].

—SA


这篇关于如何创建解决方案预构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆