Teamcity 에이전트에서 xunit과의 통합 테스트를 수행하는 CI 프로세스의 일부로 컴퓨팅 에뮬레이터를 실행하는 데 문제가 있습니다. 다음 코드를 사용하여 Xunit 테스트를 실행하는 동안 에뮬레이터를 시작하고 인스턴스를 배포합니다.TeamCity Agent에서 Azure Compute Emulator 실행
ExecuteCsrunWith(serviceDirectory + " " + configurationFile);
private ProcessExecutionResult ExecuteCsrunWith(string argument)
{
var result = new ProcessExecutionResult();
using (var process = new Process())
{
process.StartInfo = new ProcessStartInfo(PathToCsrun, argument)
{
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true
};
process.Start();
result.Output = process.StandardOutput.ReadToEnd();
result.Error = process.StandardError.ReadToEnd();
process.WaitForExit();
Log(result.Output);
Log(result.Error);
}
return result;
}
시험은 작동하지 않습니다와 나는 이벤트 로그에이 오류가 있습니다
응용 프로그램 : v4.0.30319 설명 : : 프로세스가로 인해 종료 된 프레임 워크 버전 csmonitor.exe 처리되지 않은 예외. 예외 정보 : System.InvalidOperationException 스택 : at System.Windows.Forms.MessageBox.ShowCore (System.Windows.Forms.IWin32Window, System.String, System.String, System.Windows.Forms.MessageBoxButtons, System.Windows. System.Windows.Forms.MessageBoxDefaultButton (System.Windows.Forms.MessageBoxOptions, Boolean) 에서 System.Windows.Forms.MessageBox.Show (System.String, System.String, System.Windows.Forms.MessageBoxButtons,
012,351,641 : System.Windows.Forms.MessageBoxIcon) Microsoft.ServiceHosting.Tools.CloudServicesMonitor.Program.Main에서 는 (선택 System.String [])
얹는
오류있는 응용 프로그램 이름 : csmonitor.exe 버전 : 2.4.6489.1, 타임 스탬프 : 0x53bdc3cc 오류있는 모듈 이름 : KERNELBASE.dll 버전 : 6.2.9200.16864, 타임 스탬프 : 0x531d34d8 예외 코드 : 0xe0434352 오류 오프셋 : 0x0000000000047b8c 오류있는 프로세스 ID : 0x01cff4c9c18a8431 오류있는 응용 프로그램 경로 : C : \ 프로그램 파일 \은 Microsoft SDKs \ 푸른 \ 에뮬레이터 \ 오류있는 모듈 경로 csmonitor.exe : C : \ WINDOWS \ system32를 \ KERNELBASE.dll 0xe98 오류있는 응용 프로그램 시작 시간 보고 ID : 2321e30b-60bd-11e4-9406-00155dfd9db8 오류있는 패키지 전체 이름 : 오류가있는 패키지 상대 응용 프로그램 ID :
은 내가 리디렉션 출력을 읽을 필요가 있기 때문에 인 UseShellExecute = 거짓를 사용해야합니다.