2009-10-21 2 views
7

CustomizableOutDir을 사용할 때 TFS Team Build에서 MSTest.exe가 제대로 실행되지 않는 문제가 있습니다.CustomizableOutDir = true 팀 빌드 중 MSTest.exe가 깨짐

TFSBuild.rsp

/verbosity:diagnostic 
/p:CustomizableOutDir=true 

TFSBuild.proj (솔루션 조각을 구축하기) <Properties>OutputPath=$(BinariesRoot)\TestHarness\</Properties><Properties></Properties> 모두

<!-- code --> 
    <SolutionToBuild Include="$(BuildProjectFolderPath)/../../foo.csproj"> 
     <Properties>OutputPath=$(BinariesRoot)\WindowsServices\foo\</Properties> 
    </SolutionToBuild> 
    <!-- tests --> 
    <SolutionToBuild Include="$(BuildProjectFolderPath)/../../test/test.sln"> 
     <Targets>t1;t2</Targets> 
     <Properties>OutputPath=$(BinariesRoot)\TestHarness\</Properties> 
    </SolutionToBuild> 

, I 빌드의 끝 부분에 다음과 같은 오류가 발생합니다 :

"C : \ build \ BuildType \ TFSBuild.proj" (TestConfiguration 대상 MSBUILD : 경고 MSB6003 : 지정한 작업 실행 파일 "MSTest.exe" 을 실행할 수 없습니다. 디렉토리 이름 이 this article을 찾은 후

무효, 그때와는 추가 한 다음

이 준
<Target Name="AfterCompile"> 
    <ItemGroup> 
     <SolutionOutputs Condition="'%(CompilationOutputs.Solution)' == '$(Solution)'" Include="%(RootDir)%(Directory)**\*.*" /> 
     <ServiceOutputs Include="$(BinariesRoot)\WindowsServices\**\*.*" /> 
     <TestHarnessOutputs Include="$(BinariesRoot)\TestHarness\*.*" /> 
    </ItemGroup> 
    <Copy SourceFiles="@(SolutionOutputs)" DestinationFolder="$(TeamBuildOutDir)" /> 
    <Copy SourceFiles="@(ServiceOutputs)" DestinationFolder="$(TeamBuildOutDir)" /> 
    <Copy SourceFiles="@(TestHarnessOutputs)" DestinationFolder="$(TeamBuildOutDir)" /> 
    </Target> 

:

(AfterCompile 대상) ->
C : \ build \ BuildType \ TFSBuild.proj (289,5) : 오류 MSB3023 : 복사 대상에 지정된 이 없습니다. 에 "DestinationFiles"또는 "DestinationDirectory"를 입력하십시오.

DestinationDirectory는 http://schemas.microsoft.com/developer/msbuild/2003 스키마의 일부가 아니지만 어쨌든 시도해 보았습니다. 그래서 DestinationDirectory에 복사 작업에 대한 모든 DestinationFolder를 변경 예상대로 나는이있어 :

(AfterCompile 대상) ->
C를 : \ \ BuildType \ TFSBuild.proj (288,44) 구축 : 를 오류 MSB4064 : "DestinationDirectory"매개 변수는 이며 "복사"작업에서는 지원되지 않습니다. 작업에 매개 변수가 있는지 확인하고 설정 가능한 public 인스턴스 속성입니다.
C : \ build \ BuildType \ TFSBuild.proj (288,5) : 오류 MSB4063 : 매개 변수로 "복사"작업을 초기화 할 수 없습니다.

TFS 팀 빌드와 함께 CustomizableOutDir과 MSTest가 함께 작동하는 사람이 있습니까?

이 편집 :

내가 this discussion을 발견하고이 변경 적용 :

<Target Name="BeforeTest"> 
    <!-- The tests won't run if the binaries directory does not exist --> 
    <MakeDir 
    Directories="$(BinariesRoot)\%(ConfigurationToBuild.FlavorToBuild)" 
    Condition="!Exists('$(BinariesRoot)\%(ConfigurationToBuild.FlavorToBuild)')" /> 
</Target> 

이 결과 :

"C : \ \ BuildType \ TFSBuild.proj를 구축" 을 (RunTest 대상) (1:11) -> "C : \ build \ BuildType \ TFSBuild.proj" (TestConfiguration 대상) (1:12) -> (CoreTest 구성 대상) ->
MSBUILD : MSB6006 경고 : "MSTest.exe"코드 1

답변

4

이 TFS/MSTEST/msbuild를 행복하게로 종료.

<Target Name="BeforeTest"> 
    <!-- The tests won't run if the binaries directory does not exist --> 
    <MakeDir 
    Directories="$(BinariesRoot)\%(ConfigurationToBuild.FlavorToBuild)" 
    Condition="!Exists('$(BinariesRoot)\%(ConfigurationToBuild.FlavorToBuild)')" /> 
</Target> 

배포 및 테스트 상자 구성에서 테스트 결과를 얻는 데는 다른 문제점이 없었습니다.