simon burgess

Ive got a build that ultimately shows a failed status even though there are no errors reported in the build log. When I turn unit tests off, the build corerctly reports success, but with unit tests on I get the failed status even though all unit tests pass. I've tried posting the build log but its too big so I'm including my build script in the hope that someone may spot something. Any ideas appreciated

< xml version="1.0" encoding="utf-8" >

<Project DefaultTargets="DesktopBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!-- TO EDIT BUILD TYPE DEFINITION

To edit the build type, you will need to edit this file which was generated

by the Create New Build Type wizard. This file is under source control and

needs to be checked out before making any changes.

The file is available at -

$/{TeamProjectName}/TeamBuildTypes/{BuildTypeName}

where you will need to replace TeamProjectName and BuildTypeName with your

Team Project and Build Type name that you created

Checkout the file

1. Open Source Control Explorer by selecting View -> Other Windows -> Source Control Explorer

2. Ensure that your current workspace has a mapping for the $/{TeamProjectName}/TeamBuildTypes folder and

that you have done a "Get Latest Version" on that folder

3. Browse through the folders to {TeamProjectName}->TeamBuildTypes->{BuildTypeName} folder

4. From the list of files available in this folder, right click on TfsBuild.Proj. Select 'Check Out For Edit...'

Make the required changes to the file and save

Checkin the file

1. Right click on the TfsBuild.Proj file selected in Step 3 above and select 'Checkin Pending Changes'

2. Use the pending checkin dialog to save your changes to the source control

Once the file is checked in with the modifications, all future builds using

this build type will use the modified settings

-->

<!-- Do not edit this -->

<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets" />

<Import Project="$(MSBuildProjectDirectory)\BuildingFx11inTB.targets" Condition="'$(IsDesktopBuild)'!='true'"/>

<Import Project="$(MSBuildExtensionsPath)\Microsoft\AssemblyInfoTask\Microsoft.VersionNumber.targets" Condition="'$(IsDesktopBuild)'!='true'" />

<ProjectExtensions>

<!-- DESCRIPTION

The description is associated with a build type. Edit the value for making changes.

-->

<Description>

</Description>

<!-- BUILD MACHINE

Name of the machine which will be used to build the solutions selected.

-->

<BuildMachine>sch015109</BuildMachine>

</ProjectExtensions>

<PropertyGroup>

<!-- TEAM PROJECT

The team project which will be built using this build type.

-->

<TeamProject>SETP_P2</TeamProject>

<!-- BUILD DIRECTORY

The directory on the build machine that will be used to build the

selected solutions. The directory must be a local path on the build

machine (e.g. c:\build).

-->

<BuildDirectoryPath>d:\Source</BuildDirectoryPath>

<!-- DROP LOCATION

The location to drop (copy) the built binaries and the log files after

the build is complete. This location has to be a valid UNC path of the

form \\Server\Share. The build machine service account and application

tier account need to have read write permission on this share.

-->

<DropLocation>\\sch015109\Release\Project_Branches\SETP_P2</DropLocation>

<!-- TESTING

Set this flag to enable/disable running tests as a post build step.

-->

<RunTest>false</RunTest>

<InstallUninstall>false</InstallUninstall>

<Install>false</Install>

<CopyInstallersLocation Condition="'$(IsDesktopBuild)'=='true'">$(SolutionRoot)\DesktopBuildInstallers</CopyInstallersLocation>

<CopyInstallersLocation Condition="'$(IsDesktopBuild)'!='true'">$(BinariesRoot)\Installers</CopyInstallersLocation>

<ExecuteInstallersLocation Condition="'$(IsDesktopBuild)'=='true'"></ExecuteInstallersLocation>

<ExecuteInstallersLocation Condition="'$(IsDesktopBuild)'!='true'">..\..\..\..\TempInstallers\$(BuildType)</ExecuteInstallersLocation>

<!-- WorkItemFieldValues

Add/edit key value pairs to set values for fields in the work item created

during the build process. Please make sure the field names are valid

for the work item type being used.

-->

<WorkItemFieldValues>Symptom=build break;Steps To Reproduce=Start the build using Team Build</WorkItemFieldValues>

<!-- CODE ANALYSIS

To change CodeAnalysis behavior edit this value. Valid values for this

can be Default,Always or Never.

Default - To perform code analysis as per the individual project settings

Always - To always perform code analysis irrespective of project settings

Never - To never perform code analysis irrespective of project settings

-->

<WorkItemType>Defect</WorkItemType>

<RunCodeAnalysis>Default</RunCodeAnalysis>

<!-- UPDATE ASSOCIATED WORK ITEMS

Set this flag to enable/disable updating associated workitems on a successful build

-->

<UpdateAssociatedWorkItems>true</UpdateAssociatedWorkItems>

<!-- Title for the work item created on build failure -->

<WorkItemTitle>Build failure in build:</WorkItemTitle>

<!-- Description for the work item created on build failure -->

<DescriptionText>This work item was created by Team Build on a build failure.</DescriptionText>

<!-- Text pointing to log file location on build failure -->

<BuildlogText>The build log file is at:</BuildlogText>

<!-- Text pointing to error/warnings file location on build failure -->

<ErrorWarningLogText>The errors/warnings log file is at:</ErrorWarningLogText>

</PropertyGroup>

<PropertyGroup>

<AdditionalPropertiesForBuildTarget Condition=" '$(IsDesktopBuild)'!='true' ">DelaySign=false;SignAssembly=true;AssemblyOriginatorKeyFile=c:\Exweb.PrivateKey.snk</AdditionalPropertiesForBuildTarget>

</PropertyGroup>

<!-- Assembly version properties. Add others here -->

<PropertyGroup>

<!-- TF.exe -->

<TF>&quot;$(TeamBuildRefPath)\..\tf.exe&quot;</TF>

<!-- AssemblyInfo file spec -->

<AssemblyInfoSpec>AssemblyInfo.*</AssemblyInfoSpec>

</PropertyGroup>

<ItemGroup>

<!-- SOLUTIONS

The path of the solutions to build. To add/delete solutions, edit this

value. For example, to add a solution MySolution.sln, add following line -

<SolutionToBuild Include="$(SolutionRoot)\path\MySolution.sln" />

To change the order in which the solutions are build, modify the order in

which the solutions appear below.

-->

<SolutionToBuild Condition=" 'Architecture'=='$(BuildSubSection)' OR ''=='$(BuildSubSection)'"

Include="$(SolutionRoot)\Root\Src\Exchange\Architecture.sln" />

<SolutionToBuild Condition="'Exweb'=='$(BuildSubSection)' OR ''=='$(BuildSubSection)'"

Include="$(SolutionRoot)\Root\Src\Exchange\Exweb.sln" />

<SolutionToBuild Condition=" '$(IsDesktopBuild)'!='true' AND ''=='$(BuildSubSection)'"

Include="$(SolutionRoot)\Root\Src\Exchange\Exweb\Rendering Engines\RenderXWrapper\RenderXWrapper.sln" />

</ItemGroup>

<ItemGroup>

<!-- CONFIGURATIONS

The list of configurations to build. To add/delete configurations, edit

this value. For example, to add a new configuration, add following lines -

<ConfigurationToBuild Include="Debug|x86">

<FlavorToBuild>Debug</FlavorToBuild>

<PlatformToBuild>x86</PlatformToBuild>

</ConfigurationToBuild>

The Include attribute value should be unique for each ConfigurationToBuild node.

-->

<ConfigurationToBuild Include="Release|Any CPU">

<FlavorToBuild>Release</FlavorToBuild>

<PlatformToBuild>Any CPU</PlatformToBuild>

</ConfigurationToBuild>

</ItemGroup>

<ItemGroup>

<!-- TEST ARGUMENTS

If the RunTest is set to true then the following test arguments will be

used to run tests.

To add/delete new testlist or to choose a metadata file (.vsmdi) file, edit this value.

For e.g. to run BVT1 and BVT2 type tests mentioned in the Helloworld.vsmdi file, add the following -

<MetaDataFile Include="$(SolutionRoot)\HelloWorld\HelloWorld.vsmdi">

<TestList>BVT1;BVT2</TestList>

</MetaDataFile>

Where BVT1 and BVT2 are valid test types defined in the HelloWorld.vsmdi file.

MetaDataFile - Full path to test metadata file.

TestList - The test list in the selected metadata file to run.

Please note that you need to specify the vsmdi file relative to $(SolutionRoot)

-->

<MetaDataFile Condition=" 'Architecture'=='$(BuildSubSection)' OR ''=='$(BuildSubSection)'"

Include="$(SolutionRoot)\Root\Src\Exchange\Architecture.vsmdi">

<TestList>Enterprise Library</TestList>

<RunConfigFile>$(SolutionRoot)\Root\Src\Exchange\Architecture.testrunconfig</RunConfigFile>

</MetaDataFile>

<MetaDataFile Condition="'Exweb'=='$(BuildSubSection)' OR ''=='$(BuildSubSection)'"

Include="$(SolutionRoot)\Root\Src\Exchange\Exweb.vsmdi">

<TestList>Exweb Unit Tests</TestList>

<RunConfigFile>$(SolutionRoot)\Root\Src\Exchange\Exweb.testrunconfig</RunConfigFile>

</MetaDataFile>

<MetaDataFile Condition=" '$(IsDesktopBuild)'!='true' AND ''=='$(BuildSubSection)'"

Include="$(SolutionRoot)\Root\Src\Exchange\Exweb\Rendering Engines\RenderXWrapper\RenderXWrapper.vsmdi">

<TestList>RenderXWrapperBusinessLogic</TestList>

<TestList>RenderXWrapperService</TestList>

</MetaDataFile>

</ItemGroup>

<ItemGroup>

<!-- ADDITIONAL REFERENCE PATH

The list of additional reference paths to use while resolving references.

For example,

<AdditionalReferencePath Include="C:\MyFolder\" />

<AdditionalReferencePath Include="C:\MyFolder2\" />

-->

</ItemGroup>

<UsingTask TaskName="ExchangeTasks.LabelChangesThatHaveValidTask" AssemblyFile="$(exchangetasksroot)\ExchangeTasks.dll" />

<UsingTask TaskName="ExchangeTasks.CheckInWithWorkItem" AssemblyFile="$(exchangetasksroot)\ExchangeTasks.dll" />

<UsingTask TaskName="ExchangeTasks.IncrementBuildNumber" AssemblyFile="$(exchangetasksroot)\ExchangeTasks.dll" />

<Target Name="BeforeClean" Condition=" '$(IsDesktopBuild)'!='true' " >

<!-- Undo all pending changes before starting custom build steps in case build broke half way through

previously-->

<Message Text="Custom: Undo all pending changes before starting build"/>

<Exec WorkingDirectory="$(SolutionRoot)"

Command="$(TF) undo /noprompt /recursive $(SolutionRoot)"

IgnoreExitCode="true"

ContinueOnError="true"/>

<!--make sure all AssemblyInfo files are set to read-only as the Get operation will fail if it has to overwite-->

<Exec WorkingDirectory="$(SolutionRoot)\Root\Src"

Command="$(MSBuildProjectDirectory)\ChangeAsInfosAttribs.bat $(AssemblyInfoSpec) R"

ContinueOnError="true"/>

</Target>

<Target Name="CoreGet" Condition=" '$(IsDesktopBuild)'!='true' " DependsOnTargets="$(CoreGetDependsOn)" >

<LabelChangesThatHaveValidTask

Domain="http://sch015226:8080"

Project="$(TeamProject)"/>

<Get

Condition=" '$(SkipGet)'!='true' "

Workspace="$(WorkspaceName)"

Recursive="$(RecursiveGet)"

Version="LTASK-OK"

Force="$(ForceGet)" />

</Target>

<Target Name="AfterGet" Condition="'$(IsDesktopBuild)'!='true'">

<!-- Run Database Build -->

<Message Condition=" '$(RunDBBuild)'!='false' " Text="Custom: Running DB build"/>

<Exec Condition=" '$(RunDBBuild)'!='false' "

WorkingDirectory="C:\Bat"

Command="Run_Database_Build.bat Create Local . $(SolutionRoot) &quot; &quot; "

ContinueOnError="false"/>

<!-- use create item as item group is evaluated at the start of

the build process therefore would not include any changes-->

<Message Text="Custom: Checkout '$(AssemblyInfoSpec)' for update"/>

<CreateItem

Include="$(SolutionRoot)\Root\Src\Exchange\**\$(AssemblyInfoSpec)"

Exclude="$(SolutionRoot)\Root\Src\Exchange\Exweb\FxCopRules\**\$(AssemblyInfoSpec)" >

<Output TaskParameter="Include" ItemName="AssemblyInfoFiles" />

</CreateItem>

<Message Text="Custom: Make writable '$(AssemblyInfoSpec)' for update"/>

<Exec WorkingDirectory="$(SolutionRoot)\Root\Src"

Command="$(MSBuildProjectDirectory)\ChangeAsInfosAttribs.bat $(AssemblyInfoSpec) RW"

ContinueOnError="false"/>

<!-- check out build number resource file so that they can be updated by build -->

<Message Text="Custom: Checkout 'Installer.txt' for storing current build number"/>

<Exec WorkingDirectory="$(SolutionRoot)\NoMerge"

Command="$(TF) checkout Installer.txt"

ContinueOnError="false"/>

<IncrementBuildNumber

Condition="'$(IsDesktopBuild)'=='false'"

File="$(SolutionRoot)\NoMerge\Installer.txt" >

<Output TaskParameter="AssemblyFileVersion" PropertyName="AsmInfoFileVersion" />

</IncrementBuildNumber>

<Copy

DestinationFiles="$(wixroot)\Installer.txt"

SourceFiles="$(SolutionRoot)\NoMerge\Installer.txt"

Condition="'$(IsDesktopBuild)'!='true'" />

</Target>

<Target Name="AfterCompile">

<Message Condition="'$(IsDesktopBuild)'!='true'"

Text="Custom: Set read-only '$(AssemblyInfoSpec)' for update"/>

<Exec Condition="'$(IsDesktopBuild)'!='true'"

WorkingDirectory="$(SolutionRoot)\Root\Src"

Command="$(MSBuildProjectDirectory)\ChangeAsInfosAttribs.bat $(AssemblyInfoSpec) R"

ContinueOnError="true"/>

<!--build documentation-->

<CreateItem Condition=" '$(RunDocBuild)'=='true' AND '$(IsDesktopBuild)'!='true'"

Include="$(MSBuildProjectDirectory)\Document*.proj">

<Output TaskParameter="Include" ItemName="SandcastleBuildScripts" />

</CreateItem>

<Copy

Condition=" '$(RunDocBuild)'=='true' AND '$(IsDesktopBuild)'!='true'"

DestinationFiles="@(SandcastleBuildScripts->'$(BinariesRoot)\%(filename)%(extension)')"

SourceFiles="@(SandcastleBuildScripts)" />

<Message Condition=" '$(RunDocBuild)'=='true' AND '$(IsDesktopBuild)'!='true'"

Text="Custom: build API documentation into .chm files"/>

<MSBuild Condition=" '$(RunDocBuild)'=='true' AND '$(IsDesktopBuild)'!='true'"

Projects="$(BinariesRoot)\Document-EntLib.proj"

Targets="Documentation"

/>

<MSBuild Condition=" '$(RunDocBuild)'=='true' AND '$(IsDesktopBuild)'!='true'"

Projects="$(BinariesRoot)\Document-Exweb.proj"

Targets="Documentation"

/>

<!-- Copy the documentation to the latest documentation folder -->

<CreateItem Condition=" '$(RunDocBuild)'=='true' AND '$(IsDesktopBuild)'!='true'"

Include="$(BinariesRoot)\..\DocBuild\*.chm">

<Output TaskParameter="Include" ItemName="HelpFiles" />

</CreateItem>

<Message Condition=" '$(RunDocBuild)'=='true' AND '$(IsDesktopBuild)'!='true'"

Text="Custom: Copy HelpFiles to '$(BinariesRoot)\Documentation'"/>

<Copy

Condition=" '$(RunDocBuild)'=='true' AND '$(IsDesktopBuild)'!='true'"

DestinationFiles="@(HelpFiles->'$(BinariesRoot)\Documentation\%(filename)%(extension)')"

SourceFiles="@(HelpFiles)" />

<Message Condition=" '$(RunDocBuild)'=='true' AND '$(IsDesktopBuild)'!='true'"

Text="Custom: Copy HelpFiles to '$(DropLocation)\..\LatestDocumentation\$(BuildType)'"/>

<Copy

Condition=" '$(RunDocBuild)'!='false' AND '$(IsDesktopBuild)'!='true'"

DestinationFiles="@(HelpFiles->'$(DropLocation)\LatestDocumentation\%(filename)%(extension)')"

SourceFiles="@(HelpFiles)" />

<!-- Create a list of all the install packages created so we can copy

them to the output folder -->

<CreateItem Include="$(SolutionRoot)\Root\Src\Exchange\**\*.msi;">

<Output TaskParameter="Include" ItemName="Installers" />

</CreateItem>

<!-- Copy the installers to temp location-->

<Message Text="Custom: Copy Installers to '$(CopyInstallersLocation)'"/>

<Copy

DestinationFiles="@(Installers->'$(CopyInstallersLocation)\%(filename)%(extension)')"

SourceFiles="@(Installers)" />

<!-- Create a list of all the MacroInstallers so we can copy

them to the output folder -->

<CreateItem Include="$(SolutionRoot)\Root\Common\Wix\MacroInstallers\*.bat;">

<Output TaskParameter="Include" ItemName="MacroInstallers" />

</CreateItem>

<!-- Copy the MacroInstallers to temp location-->

<Message Text="Custom: Copy Batch Files to '$(CopyInstallersLocation)'"/>

<Copy

DestinationFiles="@(MacroInstallers->'$(CopyInstallersLocation)\%(filename)%(extension)')"

SourceFiles="@(MacroInstallers)" />

<!-- run install of msi's -->

<Message Condition="'$(RunTest)'=='true' OR '$(Install)'=='true' OR '$(InstallUninstall)'=='true'"

Text="Custom: Run Developer.bat"/>

<Exec Condition="'$(RunTest)'=='true' OR '$(Install)'=='true' OR '$(InstallUninstall)'=='true'"

WorkingDirectory="$(CopyInstallersLocation)"

Command="Developer.bat /q $(ExecuteInstallersLocation)"

ContinueOnError="false"/>

<!-- run uninstall of msi's if not running unit tests -->

<Message Condition="'$(RunTest)'=='false' AND '$(InstallUninstall)'=='true'"

Text="Custom: Run Uninstall-Developer.bat"/>

<Exec Condition="'$(RunTest)'=='false' AND '$(InstallUninstall)'=='true'"

WorkingDirectory="$(CopyInstallersLocation)\$(ExecuteInstallersLocation)"

Command="Uninstall-Developer.bat /q"

ContinueOnError="false"/>

<!-- Copy output assemblies -->

<CreateItem Condition="'$(IsDesktopBuild)'!='true'"

Include="$(BinariesRoot)\**\*.*" >

<Output ItemName="BinariesToCopy" TaskParameter="Include" />

</CreateItem>

<!--

<Message Condition="'$(IsDesktopBuild)'!='true'"

Text="Custom: Copy Files From Binaries Root to Release Area ready for checkin"/>

<Copy Condition="'$(IsDesktopBuild)'!='true'"

SourceFiles="@(BinariesToCopy)"

DestinationFiles="@(BinariesToCopy ->'$(SolutionRoot)\Root\Release\%(RecursiveDir)%(Filename)%(Extension)')"

ContinueOnError="true" />

<Message Condition="'$(IsDesktopBuild)'!='true'"

Text="Custom: Add the Release area to source control"/>

<Exec Condition="'$(IsDesktopBuild)'!='true'"

WorkingDirectory="$(SolutionRoot)\Root\Release"

Command="$(TF) add $(SolutionRoot)\Root\Release\*.* /recursive "/>

-->

<Message Condition="'$(IsDesktopBuild)'!='true'"

Text="Custom: Checkin pending changes to commit the add to source control"/>

<CheckInWithWorkItem

Condition="'$(IsDesktopBuild)'!='true'"

Domain="http://sch015226:8080"

WorkspaceName="$(WorkspaceName)"

WorkItemID="473"

CheckinComment="$(BuildNumber)"/>

<Label

Condition="'$(IsDesktopBuild)'!='true'"

Workspace="$(WorkspaceName)"

Name="$(BuildNumber)"

Version="W$(WorkspaceName)"

Files="$/$(TeamProject)"

Recursive="true" />

</Target>

<Target Name="AfterTest">

<Message Condition=" '$(InstallUninstall)'=='true' AND '$(RunTest)'=='true'"

Text="Custom: Run Uninstall-Developer.bat "/>

<Exec Condition=" '$(InstallUninstall)'=='true' AND '$(RunTest)'=='true'"

WorkingDirectory="$(CopyInstallersLocation)\$(ExecuteInstallersLocation)"

Command="Uninstall-Developer.bat /q"

ContinueOnError="false"/>

</Target>

<!-- In case of Build failure, the AfterCompile target is not executed. Undo the changes -->

<Target Name="BeforeOnBuildBreak" Condition="'$(IsDesktopBuild)'!='true'">

<!--<Exec WorkingDirectory="$(SolutionRoot)\Root\Source\Exchange"

Command="$(TF) undo /noprompt /recursive $(AssemblyInfoSpec)"/>-->

<Exec WorkingDirectory="$(SolutionRoot)\Root\Src"

Command="$(MSBuildProjectDirectory)\ChangeAsInfosAttribs.bat $(AssemblyInfoSpec) R"

ContinueOnError="true"/>

<Exec WorkingDirectory="$(SolutionRoot)\NoMerge"

Command="$(TF) undo /noprompt Installer.txt"

ContinueOnError="true"/>

</Target>

</Project>



Re: Team Foundation Server - Build Automation Team Build status shows failed at end but no errors

Jason Pricket - MSFT

At a first glance, the Exec tasks at the end might be the culprit. Especially, this one

<Target Name="AfterTest">
<
Message Condition=" '$(InstallUninstall)'=='true' AND '$(RunTest)'=='true'" Text="Custom: Run Uninstall-Developer.bat "/>
<
Exec Condition=" '$(InstallUninstall)'=='true' AND '$(RunTest)'=='true'"
WorkingDirectory="$(CopyInstallersLocation)\$(ExecuteInstallersLocation)"
Command="Uninstall-Developer.bat /q"
ContinueOnError="false"/>
</
Target>

For two reasons:

  1. It has ContinueOnError set to false, this could cause the build to fail
  2. and it only runs if you run the tests.

Of course I am only guessing, without the build log to look at.

Thanks, Jason





Re: Team Foundation Server - Build Automation Team Build status shows failed at end but no errors

simon burgess

thanks for the reply, ContinueOnError="false" would mean exactly that, an error in the Exec task would make the build fail and the build log would pick that up.

I think I have spotted the problem, although all the unit tests pass, when I crack open the test run results file (.trx) in the corner of the results there is an overall status of the test run and the was set to 'test run:error'. When you click on it, it showed that there was an error in one of my unit test cleanup operations.





Re: Team Foundation Server - Build Automation Team Build status shows failed at end but no errors

Jason Pricket - MSFT

I guess that could do it too :) Thanks for posting the followup. Sounds like you found an interesting bug. In a future version, Team Build should bubble that error up so that you can see it in the build report.

Jason





Re: Team Foundation Server - Build Automation Team Build status shows failed at end but no errors

Dmitry G.

OK, this post helped me a lot (mostly the posted example).

However I have a silly problem. After compiling and successfull run of tests my build never stops!

It just keeps running. Obviously it starts to run same tests second time and hangs. I can see that from the report after I force the build to stop ("TFSBuild stop ...." ).

I have three tasks overridden: AfterGet, BeforeCompile and AfterCompile. In AfterCompile I create test lists, that's all:

<Target Name="AfterCompile">

<!-- Create drop directories -->

<MakeDir Directories="$(DropLocation)\$(BuildNumber)\%(ConfigurationToBuild.FlavorToBuild)\with user manual"/>

<MakeDir Directories="$(DropLocation)\$(BuildNumber)\%(ConfigurationToBuild.FlavorToBuild)\without user manual"/>

<!-- Delete existing vsmdi files -->

<Delete Files="$(IdiomComponentsSolutionPath)\generated.vsmdi"/>

<Delete Files="$(IdiomComponentsSolutionPath)\generated2.vsmdi"/>

<!-- Dynamically create unit test lists from the assemblies -->

<CreateTestList

Condition="'%(ConfigurationToBuild.FlavorToBuild)'=='Release'"

File="$(IdiomComponentsSolutionPath)\generated.vsmdi"

Assemblies="@(IdiomComponentsTestAssembly)"

SolutionFolder="$(IdiomComponentsSolutionPath)\"

RunConfigurationFile="$(IdiomComponentsSolutionPath)\localtestrun.testrunconfig" />

<CreateTestList

Condition="'%(ConfigurationToBuild.FlavorToBuild)'=='Release'"

File="$(IdiomComponentsSolutionPath)\generated2.vsmdi"

Assemblies="@(IdiomComponentsTestAssembly2)"

SolutionFolder="$(IdiomComponentsSolutionPath)\"

RunConfigurationFile="$(IdiomComponentsSolutionPath)\Migration_TestRunConfig.testrunconfig" />

</Target>

In Microsoft.TeamFoundation.Build.Targets I set:

<!-- Test task for the end-to-end build -->
<TestToolsTask
Condition=" '$(IsDesktopBuild)'!='true' and '%(MetaDataFile.Identity)'!=''"
BuildFlavor="$(Flavor)"
Platform="$(Platform)"
PublishServer="$(TeamFoundationServerUrl)"
PublishBuild="$(BuildNumber)"
SearchPathRoot="$(SearchPathRoot)"
PathToResultsFilesRoot="$(TestResultsRoot)"
MetaDataFile="%(MetaDataFile.Identity)"
RunConfigFile="$(RunConfigFile)"
TestLists="%(MetaDataFile.TestList)"
TeamProject="$(TeamProject)"
ContinueOnError="false" />

Any idea would be very appreciated.






Re: Team Foundation Server - Build Automation Team Build status shows failed at end but no errors

Jason Pricket - MSFT

Hi Dmitry,

I am not sure what is causing your builds to "never stop", but I think you can solve the problem of running tests without dynamically creating the vsmdi files.

Check out Buck's blog post on the subject. He gives you a custom task that will make the process a lot easier, and hopefully get your builds working again Smile

Hope that helps, Jason