2016-08-23 3 views
0

Visual Studio 2015에 .NET Azure 솔루션이 있습니다.이 응용 프로그램은 2 개의 작업자 역할을 사용합니다.Team Services에서 빌드가 실패합니다.

기능의 일부로 빌드 프로세스의 어느 시점에서 두 개의 dll이 클라우드 프로젝트에 복사되므로 최종 결과로 끝납니다.

는 "ServiceDefinition.csdef"에 다음과 내가 추가 한 작동하게하려면 다음에

-- Pre-build 
IF NOT EXIST $(TargetDir)ClientCustSomCode mkdir $(TargetDir)ClientCustomCode 

-- Post-build 
IF NOT EXIST $(TargetDir)ClientCustomCode mkdir $(TargetDir)ClientCustomCode 
copy $(ProjectDir)ClientCustomCode\*.dll $(TargetDir)ClientCustomCode 
copy $(ProjectDir)ClientCustomCode\*.pdb $(TargetDir)ClientCustomCode 

: 클라우드 프로젝트에서

<WorkerRole name="SomeProject.Foreman" vmsize="Small"> 
    <Contents> 
    <Content destination="ClientCustomCode"> 
     <SourceDirectory path="ClientCustomCode" /> 
    </Content> 
    </Contents> 
    <ConfigurationSettings> 
    <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" /> 
    <Setting name="SomeProjectDocumentDBURI" /> 
    <Setting name="SomeProjectAuthorizationKey" /> 
    <Setting name="LogLevel" /> 
    <Setting name="RequestQueue" /> 
    <Setting name="RequestErrorQueue" /> 
    <Setting name="NumberOfConcurrentRequests" /> 
    <Setting name="NumberOfRequestsToReadFromAzureQueue" /> 
    <Setting name="StorageConnectionString" /> 
    <Setting name="SomeProjectPnrHistory" /> 
    <Setting name="SomeProjectClientRepository" /> 
    <Setting name="SomeProjectMessagesInProcess" /> 
    </ConfigurationSettings> 
    <LocalResources> 
    <LocalStorage name="InstallLogs" sizeInMB="5" cleanOnRoleRecycle="false" /> 
    </LocalResources> 
    <Startup> 
    <Task commandLine="install.cmd" executionContext="elevated" taskType="simple"> 
     <Environment> 
     <Variable name="PathToInstallLogs"> 
      <RoleInstanceValue xpath="/RoleEnvironment/CurrentInstance/LocalResources/LocalResource[@name='InstallLogs']/@path" /> 
     </Variable> 
     </Environment> 
    </Task> 
    </Startup> 
</WorkerRole> 

<WorkerRole name="SomeProject.Engine" vmsize="Small"> 
    <Contents> 
    <Content destination="ClientCustomCode"> 
     <SourceDirectory path="ClientCustomCode" /> 
    </Content> 
    </Contents> 
    <ConfigurationSettings> 
    <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" /> 
    <Setting name="RequestQueue" /> 
    <Setting name="RequestErrorQueue" /> 
    <Setting name="SomeProjectDocumentDBURI" /> 
    <Setting name="SomeProjectAuthorizationKey" /> 
    <Setting name="LogLevel" /> 
    <Setting name="NumberOfConcurrentRequests" /> 
    <Setting name="NumberOfRequestsToReadFromAzureQueue" /> 
    <Setting name="StorageConnectionString" /> 
    <Setting name="SomeProjectPnrHistory" /> 
    <Setting name="SomeProjectClientRepository" /> 
    <Setting name="SomeProjectMessagesInProcess" /> 
    </ConfigurationSettings> 
    <LocalResources> 
    <LocalStorage name="InstallLogs" sizeInMB="5" cleanOnRoleRecycle="false" /> 
    </LocalResources> 
    <Startup> 
    <Task commandLine="install.cmd" executionContext="elevated" taskType="simple"> 
     <Environment> 
     <Variable name="PathToInstallLogs"> 
      <RoleInstanceValue xpath="/RoleEnvironment/CurrentInstance/LocalResources/LocalResource[@name='InstallLogs']/@path" /> 
     </Variable> 
     </Environment> 
    </Task> 
    </Startup> 
</WorkerRole> 

는 내가 빌드 이벤트에 다음을 추가 복사 된 dll이 실제로 빌드되는 프로젝트 파일 :

copy $(TargetName).dll $(SolutionDir)SomeProject\SomeProject.Cloud\ClientCustomCode 
copy $(TargetName).pdb $(SolutionDir)SomeProject\SomeProject.Cloud\ClientCustomCode 

이제는 로컬로 문제없이 빌드됩니다.

2016-08-23T08:37:40.3013767Z C:\a\1\s\SomeStuff\SomeProject\SomeProject.Cloud\ServiceDefinition.csdef : error CloudServices089: Cannot find the source directory 'C:\a\1\s\SomeStuff\SomeProject\SomeProject.Cloud\ClientCustomCode' in role SomeProject.Foreman. [C:\a\1\s\SomeStuff\SomeProject\SomeProject.Cloud\SomeProject.Cloud.ccproj] 
2016-08-23T08:37:40.3013767Z C:\a\1\s\SomeStuff\SomeProject\SomeProject.Cloud\ServiceDefinition.csdef : error CloudServices089: Cannot find the source directory 'C:\a\1\s\SomeStuff\SomeProject\SomeProject.Cloud\ClientCustomCode' in role SomeProject.Engine. [C:\a\1\s\SomeStuff\SomeProject\SomeProject.Cloud\SomeProject.Cloud.ccproj] 

빌드 로그 파일 :Download 빌드가 갑자기 다음 오류와 함께 실패하기 시작 최근까지 그것은 또한 팀 서비스 구축,하지만 갑자기, 실제 이유없이 (아무 것도 변경되지 않았다) 여기있는 사람이 아이디어를 가지고 있을까요?

+0

당신이 전체 빌드 로그를 공유 할 수 있습니까? –

+0

제 질문에 추가하겠습니다. :-) – Fysicus

+0

빌드 로그 – Fysicus

답변

0

error CloudServices089: Cannot find the source directory 'C:\a\1\s\SomeStuff\SomeProject\SomeProject.Cloud\ClientCustomCode' in role SomeProject.Foreman. [C:\a\1\s\SomeStuff\SomeProject\SomeProject.Cloud\SomeProject.Cloud.ccproj]

install.cmd는 디렉터리를 만들고 어셈블리를 새 디렉터리에 복사하는 데 사용됩니다. 이 오류 메시지에서 install.cmd가 실행되지 않는다고 생각합니다. 어쩌면 install.cmd가 작업자 역할에 배포되지 않을 수 있습니다. 응용 프로그램을 게시 할 때 원격 데스크톱 사용을 통해 확인하십시오. enter image description here 작업자 역할 인스턴스의 E:\approot 디렉토리에 install.cmd가 있습니다.

항상 다음과 같이 작동 여부를 확인하기 위해 다음 솔루션에 INSTALL.CMD 찾으려고 복사로 출력 디렉토리에 복사를 설정하십시오 :

enter image description here

+0

을 포함 시켰습니다. 아직 배포가 실패했습니다. 팀 서비스의 자동화 된 빌드 만 실패합니다. – Fysicus

관련 문제