How to both package with msbuild and run tests on TFS 2010 using Continuous Integration

馋奶兔 提交于 2019-12-05 19:40:06

I had discussion about your problem with TFS Team and I was told that as of now with TFS2010 this functionality is not yet fully supported however such functionality is in they radar and could be part of future TFS releases.

Because you are using TFS 2010, here are a few pointers that could help:

I have managed to resolve this issue in my tfs build (TFS 2013). I am setting my MSBuild Argument target as /t:Publish;Build

Basically, during Publish target the unit test project is not being built. The 'Build' target builds the unit test project and my tests are executed. I also noted that the sequence of 'Publish' and then 'Build' was important. Setting 'Build' target before 'Publish' raised a few errors for my build.

This problem still exists in TFS 2013. I work around it by creating a Makefile project in the solution, and add a new 'Makefile' file with content as

all:
    msbuild $(SolutionDir)AzureProject\AzureProject.ccproj /p:TargetProfile=Cloud /t:Publish /p:Configuration=$(Configuration) /p:PublishDir=$(OutDir)

And set build command line in project property page

nmake /E SolutionDir=$(SolutionDir) /E Configuration=$(Configuration) /E OutDir=$(OutDir)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!