Actually, reading your post again, I think you are using a preprocessor construct that is not implemented in your version of CC.NET. I believe if/ifdef are new in CCNET 1.6, and the documentation has been updated without mentioning that.
On Nov 1, 9:55 am, Jeremy Lew <[email protected]> wrote: > What you want is the "ifdef" statement, which tests whether or not a > symbol is defined. "if" tests the current value of the symbol (and > errors out if it is not defined), > > <cb:ifdef name="BuildControls"> > ...etc... > </cb:ifdef> > > On Oct 29, 10:21 am, Przemys³aw W³odarczak > > <[email protected]> wrote: > > Hi, > > > I use ccnet v. 1.5.7256.1 > > I have following snippet in one of my project in ccnet.config file: > > > <tasks> > > <!-- main build --> > > <cb:if expr="'$(BuildControls)'=='true'"> > > <msbuild> > > <!-- omitted for brevity > > </msbuild> > > </cb:if> > > <cb:else> > > </cb:else> > > <msbuild> > > <!-- omitted for brevity > > </msbuild> > > </tasks> > > > However, when ccnet tries to load this, fails with exception: > > > ThoughtWorks.CruiseControl.Core.Config.Preprocessor.EvaluationException: > > Reference to unknown symbol if > > at > > ThoughtWorks.CruiseControl.Core.Config.Preprocessor.Utils.ThrowException(ExceptionFactory > > factory, String fmt, Object[] args) > > at > > ThoughtWorks.CruiseControl.Core.Config.Preprocessor.ConfigPreprocessorEnvironment._GetConstantDef(String > > name) > > at > > ThoughtWorks.CruiseControl.Core.Config.Preprocessor.ConfigPreprocessorEnvironment.eval_constant(String > > name) > > at > > ThoughtWorks.CruiseControl.Core.Config.Preprocessor.ConfigPreprocessor.PreProcess(XmlReader > > input, XmlWriter output, PreprocessorUrlResolver resolver, Uri > > input_uri) > > at > > ThoughtWorks.CruiseControl.Core.Config.DefaultConfigurationFileLoader.CreateXmlValidatingLoader(FileInfo > > configFile) > > at > > ThoughtWorks.CruiseControl.Core.Config.DefaultConfigurationFileLoader.AttemptLoadConfiguration(FileInfo > > configFile) > > at > > ThoughtWorks.CruiseControl.Core.Config.DefaultConfigurationFileLoader.Load(FileInfo > > configFile) > > at > > ThoughtWorks.CruiseControl.Core.Config.FileConfigurationService.Load() > > at > > ThoughtWorks.CruiseControl.Core.Config.FileWatcherConfigurationService.Load() > > at > > ThoughtWorks.CruiseControl.Core.Config.CachingConfigurationService.Load() > > at > > ThoughtWorks.CruiseControl.Core.CruiseServer..ctor(IConfigurationService > > configurationService, IProjectIntegratorListFactory > > projectIntegratorListFactory, IProjectSerializer projectSerializer, > > IProjectStateManager stateManager, IFileSystem fileSystem, > > IExecutionEnvironment executionEnvironment, List`1 extensionList) > > at > > ThoughtWorks.CruiseControl.Core.CruiseServerFactory.CreateLocal(String > > configFile) > > at > > ThoughtWorks.CruiseControl.Core.CruiseServerFactory.CreateRemote(String > > configFile) > > at > > ThoughtWorks.CruiseControl.Core.CruiseServerFactory.Create(Boolean > > remote, String configFile) > > at > > ThoughtWorks.CruiseControl.Service.AppRunner.CreateAndStartCruiseServer() > > at ThoughtWorks.CruiseControl.Service.AppRunner.Run(String action, > > Boolean usesShadowCopying) > > > It looks lika if command is not recognized. Instead preprocessor looks > > for variable named "if". > > What am I doing wrong? > > > Regards, Przemyslaw
