Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...