Hi,
I have been trying to automate our builds through scripts
and have come across this problem:
When I open a solution and build via the IDE, the build
will succeed. However if I run "devenv /build debug
<solutionFile>" then the build will not succeed.
I have narrowed down the problem and found that when the
solution file is loaded in the code, even though it hasn't
finished loading, the rest of the code will get executed
(ie. not all details of the solution will be available and
hence the build fails).
This problem will not occur when running the build via the
IDE since the solution has already been loaded before the
build proceeds.
Our old builds ran on VC6 using the msdev object, which
actually opened up the IDE and performed the build. With
this property, our builds should work fine. Could we
get .NET 7.1 to perform the builds this way? If not, how
can we detect that a solution has been fully loaded - so
we can then perform the build.
Here is some sample code:
set objDTE = WScript.CreateObject("VisualStudio.DTE")
set sb = objDTE.Solution
sb.Open(solutionFile)
<-- It doesn't wait till the solutionFile has been
<-- fully loaded and jumps to the build straight
<-- away, causing the build to fail.
sb.SolutionBuild.Build(True)
Regards,
Franklin
Kyle Alons - 25 Jul 2003 22:46 GMT
So which method are you using, command-line (devenv) or object model (dte)?
My experience with the command-line interface is that performs identically
to the IDE; I've never seen a timing issue like you mentioned using this
method. It seems the object model is kind of quirky, plus you don't get the
all the build output that you do from devenv.
---------------------------------------------------
Automate your software builds with Visual Build Pro
http://www.kinook.com
> Hi,
>
[quoted text clipped - 32 lines]
> Regards,
> Franklin
Franklin - 29 Jul 2003 00:31 GMT
We originally used the dte object (like the example I
provided) and now using command-line(devenv) to log the
output.
You can use the "/out <filename>" devenv switch to get the
output you would normally get via the IDE.
>-----Original Message-----
>So which method are you using, command-line (devenv) or object model (dte)?
[quoted text clipped - 45 lines]
>
>.