사용자 지정 C# 형식으로 asp.net 응용 프로그램을 미리 컴파일 할 것입니다. 프로세스 로그를 검색하고 프로세스가 성공적인 프로세스인지 여부를 확인하려면 어떻게합니까?Process.Start에서 로그를 얻는 방법
여기에 내 코드
string msPath = "c:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\";
string msCompiler = "aspnet_compiler.exe";
string fullCompilerPath = Path.Combine(msPath, msCompiler);
msPath.ThrowIfDirectoryMissing();
fullCompilerPath.ThrowIfFileIsMissing();
ProcessStartInfo process = new ProcessStartInfo
{
CreateNoWindow = false,
UseShellExecute = false,
WorkingDirectory = msPath,
FileName = msCompiler,
Arguments = "-p {0} -v/{1}"
.StrFormat(
CurrentSetting.CodeSource,
CurrentSetting.CompileTarget)
};
Process.Start(process);
감사입니다! ErrorDataReceived 이벤트 소스 응용 프로그램 레지스터에서
ProcessStartInfo 클래스에는 Start() 및 StandardOutput()이라는 메서드가 없습니다. –
@Martin Ongtangco - 아니에요. '프로세스'가 수행합니다. 여기를 참조하십시오 : http://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo_methods.aspx – Oded
안녕하세요,이 오류가 있지만 나를 도울 세부 정보가 없습니다 ... "시스템 지정된 파일을 찾을 수 없습니다 " –