CruiseControl.NET process exited event received, build results in error
Asked Answered
K

2

8

Similar to Using CruiseControl.NET and MSBuild to publish a website

I'm encountering a situation where the MSBuild task in the ccnet.config does appear to work, but at the very end the process terminates with

standard-output stream closed -- null received in event
standard-error stream closed -- null received in event
process exited event received

When run from the command line, all appears well.

I've looked in all the logfiles I can think of, but I am stumped, I've dumped a lot of time into this. Please help!

UPDATED 11/13: As requested here is excerpt from CCNET.CONFIG

        <msbuild>
            <executable>$(msBuildExe)</executable>
            <projectFile>"src\Solutions\Apprentice - Core Tests - VS11.sln"</projectFile>
            <buildArgs>/noconsolelogger /p:Configuration="$(msbuildConfig)" /v:diag</buildArgs>
            <logger>$(ccnet)\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
            <environment>
                <!-- allow NuGet to auto restore packages -->
                <variable>
                    <name>EnableNuGetPackageRestore</name>
                    <value>true</value>
                </variable>
            </environment>
        </msbuild>

With

    <cb:define msBuildExe="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe" />
    <cb:define msbuildConfig="Debug - No MSEL" />

At the top, amongst others

Kenji answered 28/10, 2013 at 20:11 Comment(7)
Can you post the MSBuild block from your ccnet config?Benedictbenedicta
Yes I will do that ASAP, sorry I just saw this requestKenji
Two things to try. Remove the quotes from the projectFile element and/or change the verbosity to quiet. Change /v:diag to /v:q.Benedictbenedicta
I will try this. Again, sorry for the slow responseKenji
Unfortunately, after trying your suggestions still no change in behavior :(Kenji
when you run it from the command line, is it the same identity (user) that runs the cc.net service?Barrows
At this time, I am running everything with full Admin access (Admin level user) until it works, then will be moving it to a "jailed" CcNet dedicated userKenji
B
3

In the answer that you linked, do you notice the timeout in the msbuild block? I bet yours is either using the default timeout or is not high enough. I would suggest upping it or adding a high value to your msbuild block.

The errors you mention are pretty similar to a process timing out using the process class in c#.

<timeout>900</timeout>

According to http://www.cruisecontrolnet.org/projects/ccnet/wiki/MsBuild_Task the default timeout is 600 seconds or 10 minutes.

Benedictbenedicta answered 29/10, 2013 at 13:28 Comment(2)
I will try this, although the build runs fairly quick on the machine!Kenji
The build takes approximately 30 seconds. I put a bigger timeout in there just to try it out (1200) but still no dice- same behavior. Thanks for the suggestion though!Kenji
M
0

Here's a thought: If you are running from the command line and it all works, you could have CCNET just using an old version of the config. Just restart the CCNet.Config service in Windows Services and see if that fixes it.

Mcgehee answered 16/12, 2013 at 15:30 Comment(3)
Unfortunately the command line is the one exhibiting the above problems - if I understand your comment correctlyKenji
Ah, misread that, my bad there. Another quick sanity check, have you narrowed down the error to the msbuild tag? Maybe there is a statement after the msbuild task that is causing the issue? If you are willing to post your project config, I am sure the community here could help out.Mcgehee
I believe I have, but since you mention it I will doublecheck. Yes I will post a sensitive-data-redacted version of the bulk of the config shortlyKenji

© 2022 - 2024 — McMap. All rights reserved.