This problem is quite annoying and I’ve been slamming up against it for a few hours now. What I’m trying to do is use the configuration preprocessor in CCNet to create an XML element which calls the task in CCNet. I think I’m fundamentally misunderstanding something.
What I have now goes like this:
<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
<cb:define name="myBuild">
<devenv>
<solutionfile>"$(projPath)"</solutionfile>
<configuration>"$(releaseMode)"</configuration>
<buildtype>Rebuild</buildtype>
<executable>C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe</executable>
<buildTimeoutSeconds>2400</buildTimeoutSeconds>
<version>VS2008</version>
</devenv>
</cb:define>
Then to use it, I do the following within a project:
<cb:myBuild projPath="C:\sample.sln" releaseMode="Release" />
The error I’m getting is
[CCNET Server: ERROR] INTERNAL ERROR: Reference to unknown symbol ‘releasemode’
Then a huge stack trace of ThoughtWorks dll’s.
My main confusion lies in why “$(projPath)” in the define works fine, but “$(releaseMode)” does not. In fact, if I remove all references to “releaseMode” in the project CCNet accepts the script and even builds them. It, however, does not work as not all of our solutions have a “Release” mode, some are specially named (for some reason, don’t ask me).
Any help as to what’s going on or, more importantly, how one could solve this issue would be much appreciated.
I am running version 1.8.2. Also, we do have plans to move the actual build scripts to NANT, but this is a first step on a long road for our build process.
I constructed a simple config file from your parts, but it works flawlessly:
Somehow I doubt the error realted to any other configuration settings on the server.
To simplify troubleshooting use
CCValidator.exeif you’re not doing it yet. This way you’ll have a lot less potential sources of problems. You can find it in yourCruiseControl.NET\serverfolder. Try opening your config file inside it to see if it displays any errors.If it does, try commenting out or removing all the parts of the config to make it as small as possible while still reproducing the issue. If you still can’t solve it, post that config for the others to take a look at.