简体   繁体   English

在Visual Studio和TFS构建中触发构建任务

[英]trigger build tasks in visual studio and tfs build

I have ac# solution with multiple projects. 我有多个项目的ac#解决方案。 I have a .sln file I build the solution with in VS2012. 我有一个.sln文件,用于在VS2012中构建解决方案。

I am looking to set up TFS Build and want to include some custom msbuild actions, such as running stylecop and fxcop rules. 我希望设置TFS Build,并希望包括一些自定义msbuild动作,例如运行stylecop和fxcop规则。 I want these tasks to fire when building the solution locally and within tfs build. 我希望在本地和tfs构建中构建解决方案时触发这些任务。

I have looked at creating a .proj file for the solution. 我已经看过为该解决方案创建一个.proj文件。 However, I am not sure how this can be setup locally and to run the tasks locally. 但是,我不确定如何在本地设置和在本地运行任务。

What is the correct setup for tasks to be run within tfs build and visual studio? 在tfs build和Visual Studio中要运行的任务的正确设置是什么?

My best guess is to set the flag "Enable Code Analysis on Build" in the project settings "Code Analysis". 我最好的猜测是在项目设置“代码分析”中设置标记“在构建时启用代码分析”。 More on that here . 这里更多。

I suppose that running StyleCop is better fitted in the IDE (check R# ) or the VCS (check SVNStyleCop ) on commit. 我想在提交时,运行StyleCop更好地适合IDE(检查R# )或VCS(检查SVNStyleCop )。 I am not sure if the same exists for GIT or other repositories. 我不确定GIT或其他存储库是否存在相同的内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM