Reputation: 6089
I am using TFS2010 and MSBuild to integrate a windows azure cloud solution to the CI.
To create the required 2 files for deployment I added in the "MSBuild Arguments" the /t:Publish
Here is the configuration I use in TFS to build the packages:
Problem is : if I remove all arguments the tests are built correctly but no azure package is built as seen on the build results:
Tho if I put the parameters the package is there but the test are not run :
Is there a way to have both ?
Upvotes: 3
Views: 647
Reputation: 521
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.
Upvotes: 3
Reputation: 890
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)
Upvotes: 0
Reputation: 20576
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:
Upvotes: 0