.NET cruise control: using cb: multi-parameter definition

This problem is quite annoying, and I have been clapping against it for several hours. What I'm trying to do is use the configuration preprocessor in CCNet to create an XML element that invokes the task in CCNet. I think that I fundamentally misunderstand something.

Now I have the following:

<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 as part of a project:

 <cb:myBuild projPath="C:\sample.sln" releaseMode="Release" /> 

The error I get is

[CCNET Server: ERROR] INTERNAL ERROR: reference to unknown character 'release'

Then a huge trace of the ThoughtWorks data stack.

My main perplexity is why the "$ (projPath)" in the definition works fine, but the "$ (releaseMode)" doesn't. In fact, if I remove all references to the "releaseMode" in the project, CCNet accepts the script and even builds them. This, however, does not work, because not all of our solutions have a "Release" mode, some of them are specially named (for some reason, do not ask me).

Any help regarding what is happening or, more importantly, how to solve this problem will be greatly appreciated.

I am running version 1.8.2. In addition, we have plans to port real build scripts to NANT, but this is the first step on a long journey for our build process.

+4
source share
1 answer

I built a simple configuration file from your parts, but it works flawlessly:

 <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> <project name="a"> <tasks> <cb:myBuild projPath="C:\sample.sln" releaseMode="Release" /> </tasks> </project> 

Somehow, I doubt that the error affected any other configuration settings on the server.

To simplify troubleshooting, use CCValidator.exe if you have not already done so. This way you will have far fewer potential sources of problems. It can be found in the CruiseControl.NET\server folder. Try opening the configuration file inside it to see if any errors are displayed.

If so, try commenting on or deleting all parts of the configuration to make it as small as possible while still maintaining the problem. If you still cannot solve it, send this configuration to others to view.

+2
source

Source: https://habr.com/ru/post/1441649/


All Articles