jdccr Posted November 5, 2007 Posted November 5, 2007 I have WinXP Pro SP2 and VS2005 SP1. I'm converting my projects from VS2003 to VS2005 and I receive a lot of warnings in several projects. For example, to one of my projects (for example MyProject.vbproj) I receive the following result in the command prompt: Build succeeded: ... ... (a lot of warnings) ... 95 Warnings(s) 0 Errors Time elapsed 00:00:00.61 But, I'm creating and application in VB2005 that use MSBuild of the following way: MyProcess = New Process MyProcess.StartInfo.FileName = "..\..\msbuild.exe" MyProcess.StartInfo.Arguments = "MyProject.vbproj /t:Rebuild /p:Configuration=Release" MyProcess.StartInfo.CreateNoWindow = True MyProcess.StartInfo.UseShellExecute = False MyProcess.StartInfo.RedirectStandardOutput = True MyProcess.Start() MyProcess.WaitForExit() When I run my application the program stops in the instruction WaitForExit() and not responding, but if I change the properties of MyProject.vbproj and disable all the warnings my application works. Please, help me. Quote
jdccr Posted November 6, 2007 Author Posted November 6, 2007 I found the solution to my problem... After of the instruction WaitForExit() I had the instruction: cResult = MyProcess.StandardOutput.ReadToEnd I resolved my problem of the following way: MyProcess.Start() cResult = MyProcess.StandardOutput.ReadToEnd MyProcess.WaitForExit() I discovered that my problem was related with the buffer of MyProcess... More details in: http://msdn2.microsoft.com/en-us/library/system.diagnostics.process.standardoutput(VS.71).aspx Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.