110,535
社区成员
发帖
与我相关
我的任务
分享
'idepath c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe
Me.MSBuild(idepath, Application.StartupPath + "\医院管理软件升级.vbproj")
Public Function MSBuild(ByVal idefilepath As String, ByVal sourcepath As String) As Boolean
Dim args As String
Try
args = " " + sourcepath + " /build"
Dim MyProcess As New Process()
MyProcess.StartInfo.FileName = idefilepath
MyProcess.StartInfo.RedirectStandardOutput = True
MyProcess.StartInfo.UseShellExecute = False
MyProcess.StartInfo.CreateNoWindow = True
MyProcess.StartInfo.Verb = "Open"
MyProcess.StartInfo.Arguments = args
MyProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden
MyProcess.Start()
Dim str As String = (MyProcess.StandardOutput.ReadToEnd)
Return True
Catch ex As Exception
MsgBox(ex.Message)
Return False
End Try
End Function