3
저는 devenv.exe를 시작하고 다른 솔루션을 빌드하려고하는 Visual Studio 패키지를 만들고 있습니다. 실시간으로 건물 출력을 얻어야하므로 사용자가 진행중인 buiding (출력)을 볼 수 있습니다. ,하지만 나는 그것을 할 수있는 방법과 심지어 가능한지 모르겠다. 어떻게하면 실시간 출력을 빌드/다시 빌드 할 수 있습니까?
나는 같은 방법으로 시도 : string rebuildLog = string.Empty;
string logFileName = System.IO.Path.GetTempFileName();
System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo();
psi.FileName = @"devenv.exe";
psi.Arguments = "\"" + config.DmsPath + "\"" + @" /rebuild" + " Release|x64 " +" /out " + logFileName;
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo = psi;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.UseShellExecute = false;
process.Start();
while (!process.StandardOutput.EndOfStream)
{
string line = process.StandardOutput.ReadLine();
MessageBox.Show(line); // just to see if it works. It should go to log form
}
rebuildLog = GetRebuildLog(logFileName);
을 그리고 rebuildLog 출력이 있습니다.
아무도 도와 줄 수 있습니까?
잘 모르겠지만 필요할 수도 있습니다 - http://ant.apache.org/antlibs/dotnet/ 자동 빌드 시스템이며 기대하는 바를 수행합니다. –