Hi,
I'm making a web service that automates some test cases. I need to compile a visual studio solution before running executables and I use this part of code to it
It starts well (I can see the devenv.exe in the task manager), but when it tries to open the solution, it kept blocked, and doesn't throw any exception.
Any idea of how getting out of it ? :'(
txs
foxjoker
I'm making a web service that automates some test cases. I need to compile a visual studio solution before running executables and I use this part of code to it
Code:
Dim DTE As EnvDTE.DTE
Try
DTE = CType(CreateObject("VisualStudio.DTE.7.1"), EnvDTE.DTE)
Catch e As Exception
WriteInLogFile("Cannot create instance of MSDEV " + e.ToString())
End Try
Try
Dim soln As EnvDTE.Solution
WriteInLogFile("Compilation started")
soln = DTE.Solution
If soln.IsOpen() Then
soln.Close(False)
End If
soln.Open(DriveName + ProjectName)
soln.SolutionBuild.Build(True)
DTE.Quit()
WriteInLogFile("Compilation ended")
Catch e As Exception
WriteInLogFile("Cannot open or compile project " + e.ToString())
DTE.Quit()
End Try
It starts well (I can see the devenv.exe in the task manager), but when it tries to open the solution, it kept blocked, and doesn't throw any exception.
Any idea of how getting out of it ? :'(
txs
foxjoker