unused node detected: ccnet 1.6.7981.1 [duplicate] - cruisecontrol.net

This question already has answers here:
Configuration does not have any version information - assuming the configuration is for version 1.5
(2 answers)
Closed 2 years ago.
i try to configure ccnet using this link tag as below
ccnet.config
<?xml version="1.0" encoding="utf-8"?>
<cruisecontrol xmlns:cb="urn:ccnet.config.builder" xmlns="http://thoughtworks.org/ccnet/1/6">
<!--# Genel Tanimlamalar -->
<cb:include href="definitions.config" xmlns:cb="urn:ccnet.config.builder"/>
<!--# Project1.config -->
<cb:include href="C:\buildBase\builds\Project1\Project1.config" xmlns:cb="urn:ccnet.config.builder"/>
</cruisecontrol>
definitions.config
<?xml version="1.0" encoding="utf-8"?>
<cb:config-template xmlns:cb="urn:ccnet.config.builder">
<cb:define name= "project-definition-block">
<workingDirectory>C:\builBase\builds\$(project)</workingDirectory>
<artifactDirectory>C:\builBase\builds\$(project)\artifact</artifactDirectory>
<category>$(category)</category>
<webURL>http://ccnet.gp.tr:81/server/ViewLatestBuildReport.aspx</webURL>
<modificationDelaySeconds>2</modificationDelaySeconds>
<maxSourceControlRetries>5</maxSourceControlRetries>
<initialState>Started</initialState>
<startupMode>UseInitialState</startupMode>
<description>$(description)</description>
<askForForceBuildReason>Required</askForForceBuildReason>
<sourceControlErrorHandling>ReportOnRetryAmount</sourceControlErrorHandling>
<state type="state" directory="C:\builBase\builds\$(project)\state" />
</cb:define>
.
.
.
.
<cb:define name="labeller-block">
<labeller type="assemblyVersionLabeller">
<major>0</major>
<minor>1</minor>
<incrementOnFailure>false</incrementOnFailure>
</labeller>
</cb:define>
</cb:config-template>
Project1.config
<?xml version="1.0" encoding="utf-8"?>
<cb:config-template xmlns:cb="urn:ccnet.config.builder">
<cb:scope xmlns:cb="urn:ccnet.config.builder"
svn-folder="xxxxx"
project="XYZ"
build-args="/p:Configuration=Debug"
build-targets="Clean;Test"
triggerInSeconds = "60"
category = "X"
description= "XYZ Programi">
<project name ="$(project)" queue="Q1" queuePriority="1">
<cb:project-definition-block/>
<cb:svn-block/>
<cb:labeller-block/>
<cb:loggers-block/>
<tasks>
<cb:msbuild-35-block/>
</tasks>
<publishers>
<cb:merge-block/>
<cb:stats-block/>
<cb:loggers-block/>
</publishers>
</project>
</cb:scope>
i am getting
ccnet.log
2011-07-29 15:24:46,109 [1:DEBUG] The trace level is currently set to debug. This will cause CCNet to log at the most verbose level, which is useful for setting up or debugging the server. Once your server is running smoothly, we recommend changing this setting in C:\tools\ci\ccent\server\ccnet.exe.Config to a lower level.
2011-07-29 15:24:46,140 [1:WARN] ! ! Tracing is enabled ! !It allows you to sent the developpers of CCNet very detailed information of the program flow. This setting should only be enabled if you want to report a bug with the extra information. When bug reporting is done, it is advised to set the trace setting off. Adjust the setting in C:\tools\ci\ccent\server\ccnet.exe.Config
2011-07-29 15:24:46,140 [1:DEBUG] [FileChangedWatcher] Add config file 'ccnet.config' to file change watcher collection.
2011-07-29 15:24:46,156 [CCNet Server:INFO] Reading configuration file "C:\tools\ci\ccent\server\ccnet.config"
2011-07-29 15:24:46,515 [CCNet Server:DEBUG] [FileChangedWatcher] Add config file 'C:\tools\ci\ccent\server\ccnet.config' to file change watcher collection.
2011-07-29 15:24:46,515 [CCNet Server:DEBUG] [FileChangedWatcher] Add config file 'C:\tools\ci\ccent\server\definitions.config' to file change watcher collection.
2011-07-29 15:24:46,515 [CCNet Server:DEBUG] [FileChangedWatcher] Add config file 'C:\buildBase\builds\Project1\Project1.config' to file change watcher collection.
2011-07-29 15:24:46,734 [CCNet Server:DEBUG] MergeFilesTask: Add 'C:\builBase\builds\Project1\reports\*.Test.xml' to 'Merge' file list.
2011-07-29 15:24:46,734 [CCNet Server:DEBUG] MergeFilesTask: Add 'C:\builBase\builds\Project1\reports\*.CoverageMerge.xml' to 'Merge' file list.
2011-07-29 15:24:46,734 [CCNet Server:DEBUG] MergeFilesTask: Add 'C:\builBase\builds\Project1\reports\*.CoverageSummary.xml' to 'Merge' file list.
2011-07-29 15:24:46,734 [CCNet Server:DEBUG] MergeFilesTask: Add 'C:\builBase\builds\Project1\reports\*.FxCop.xml' to 'Merge' file list.
2011-07-29 15:24:47,046 [CCNet Server:ERROR] Exception: Unused node detected: xmlns:cb="urn:ccnet.config.builder"
----------
ThoughtWorks.CruiseControl.Core.Config.ConfigurationException: Unused node detected: xmlns:cb="urn:ccnet.config.builder"
at ThoughtWorks.CruiseControl.Core.Config.NetReflectorConfigurationReader.DefaultErrorProcesser.ProcessError(String message)
at ThoughtWorks.CruiseControl.Core.Config.NetReflectorConfigurationReader.<>c__DisplayClass1.<Read>b__0(InvalidNodeEventArgs args)
at Exortech.NetReflector.InvalidNodeEventHandler.Invoke(InvalidNodeEventArgs args)
at Exortech.NetReflector.NetReflectorTypeTable.OnInvalidNode(InvalidNodeEventArgs args)
at Exortech.NetReflector.XmlTypeSerialiser.HandleUnusedNode(NetReflectorTypeTable table, XmlNode orphan)
at Exortech.NetReflector.XmlTypeSerialiser.ReadMembers(XmlNode node, Object instance, NetReflectorTypeTable table)
at Exortech.NetReflector.XmlTypeSerialiser.Read(XmlNode node, NetReflectorTypeTable table)
at Exortech.NetReflector.NetReflectorReader.Read(XmlNode node)
at ThoughtWorks.CruiseControl.Core.Config.NetReflectorConfigurationReader.Read(XmlDocument document, IConfigurationErrorProcesser errorProcesser)
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.Create(Boolean remote, String configFile)
at ThoughtWorks.CruiseControl.Core.ConsoleRunner.LaunchServer()
at ThoughtWorks.CruiseControl.Console.AppRunner.Run(String[] args, Boolean usesShadowCopying)
i almost tried everything, spent time for googling, what can be the problem? Which one is the node unused.. ?
Thanks in advance

Unused-node-detected-Exceptions often point to a malformed configuration.
First guess: The publisher block in Project1.config is missing its closing tag. Perhaps this is the cause?

Related

module named 'app' already exists on Android Studio

I did something wrong and I don't know what I did. But the module name has been changed to my-android-app.
And I am trying to get it back to app. The default name of single module.
I tried Rename Module. But I get.
in the drop down menu of build, there are my-android-app and app. But I just have one build.gradle of module from my-android-app.
In the project structure. I just have my-android-app. Nothing to delete.
How can I fix this problem?
You need to rename *.iml file(IntelliJ IDEA Module). This is the name of module. This file describes about the module.
Edit configuration if you see two.
Delete all except for app. And change Name to app if its name is different.
.idea >your-app.iml`
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/app/your-app.iml" filepath="$PROJECT_DIR$/app/your-app.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
</modules>
</component>
</project>
Delete one of them. (Maybe your-app.iml module tags.) Or if the location is incorrect then fix it.
File > Invalidate Caches & Restart.
Clean Build.

Overriding project properties with a custom task

Our C++ project uses MSBuild to build on Windows and GNU make on *nix. I'm trying to recreate the functionality of the following single line of GNU make in MSBuild:
GENN_PATH:=$(abspath $(dir $(shell which genn-buildmodel.sh))../userproject/include)
Essentially setting a variable to a path relative to an executable in the path. However, this is proving to be a battle to implement in MSBuild...
The following are the (hopefully) pertinent sections from my vcxproj. For testing purposes I am first setting the variable I want to override to something obvious:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
...
<PropertyGroup Label="Configuration">
...
<GeNNUserProject>UNDEFINED</GeNNUserProject>
</PropertyGroup>
Then, in my ClCompile item definitions, I am adding the value of this property to the additional include directories
<ItemDefinitionGroup>
<ClCompile>
...
<AdditionalIncludeDirectories>include;$(GeNNUserProject)</AdditionalIncludeDirectories>
</ClCompile>
...
</ItemDefinitionGroup>
In order to find this path, I'm using the where command and redirecting it's output to a property. Then, from this, I'm finding the include directory and printing it out - this works!
<Target Name="FindUserProjects">
<Exec Command="where genn-buildmodel.bat" ConsoleToMsBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="GeNNBuildModelPath" />
</Exec>
<PropertyGroup>
<GeNNUserProject>$([System.IO.Path]::GetFullPath($([System.IO.Path]::GetDirectoryName($(GeNNBuildModelPath)))\..\userproject\include))</GeNNUserProject>
</PropertyGroup>
<Message Text="MAGIC GENN-FINDING! $(GeNNBuildModelPath) -> $(GeNNUserProject)"/>
</Target>
I've tried a variety of ways of making this a dependency of ClCompile including setting the Target as BeforeTargets="PrepareForBuild" and the following:
<PropertyGroup>
<BeforeClCompileTargets>
FindUserProjects;
$(BeforeClCompileTargets);
</BeforeClCompileTargets>
</PropertyGroup>
</Project>
Whatever I do, my custom target runs but the property is not being overriden. Google suggests that if properties are overriden in depencies they should be visible from targets and from digging into Microsoft.CPP*.targets this is what setting BeforeClCompileTargets is doing.
The problem here was not that the target wasn't setting the property, it's that the AdditionalIncludeDirectories item metadata was being set from the original value. The solution is to set this directly from the target instead:
<ItemGroup>
<ClCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$([System.IO.Path]::GetFullPath($([System.IO.Path]::GetDirectoryName($(GeNNBuildModelPath)))\..\userproject\include))</AdditionalIncludeDirectories>
</ClCompile>
</ItemGroup>

Server Error in '/ccnet' Application

My CCTray says build is broken and on the server(http://172.25.165.10/ccnet/)
I get this error
Server Error in '/ccnet' Application.
Configuration Error
<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
<!-- This is your CruiseControl.NET Server Configuration file.
Add your projects below! -->
<project name="winapp"
description="demoproject showing a small config" queue="Q1">
<webURL>http://172.25.165.10/ccnet/</webURL>
<!-- specify a state folder to prevent CCNet from saving it in Program Files\CruiseControl.NET\server
programs may not standard write their data in it on windows Vista and up)
-->
<sourcecontrol type="svn">
<trunkUrl>https://citdevbox.arcade.local:8443/svn/cardwellR/trunk/winapp</trunkUrl>
<workingDirectory>c:\builds\winapp</workingDirectory>
<username>***</username>
<password>***</password>
</sourcecontrol>
<state type="state" directory="C:\CCNet\State" />
<!-- specify a artifactDirectory to prevent CCNet from saving it in Program Files\CruiseControl.NET\server
programs may not standard write their data in it on windows Vista and up)
-->
<artifactDirectory>C:\CCNet\BuildArtifacts\MyFirstProject</artifactDirectory>
<tasks>
<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework\\v3.5\MSBuild.exe</executable>
<projectFile>C:\Builds\build\BootStrapper.msbuild</projectFile>
<buildArgs>/noconsolelogger /t:CTSx86;BuildZip /v:d</buildArgs>
<logger>ThoughtWorks.CruiseControl.MsBuild.XmlLogger,C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
<timeout>900</timeout>
</msbuild>
</tasks>
<triggers>
<!-- check the source control every X time for changes,
and run the tasks if changes are found -->
<intervalTrigger
name="continuous"
seconds="300"
buildCondition="IfModificationExists"
initialSeconds="5"/>
</triggers>
<publishers>
<xmllogger />
<artifactcleanup cleanUpMethod="KeepLastXBuilds"
cleanUpValue="50" />
</publishers>
</project>
</cruisecontrol>
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: The root element must match the name of the section referencing the file, 'appSettings'
Source Error:
Line 1: cruisecontrol xmlns:cb="urn:ccnet.config.builder"
Source File: C:\Program Files (x86)\CruiseControl.NET\server\ccnet.config Line: 1
Version Information: Microsoft .NET Framework Version:2.0.50727.5456; ASP.NET Version:2.0.50727.5456
You didn't post the content of your ccnet.config file which the error you are getting is complaining about. Lets start with the obvious. I would look to see if there is a typo in there, for example maybe a missing quote or something in the appSettings section. If you have the unmodified version revert back to that and see if your issue goes away and compare the unmodified with the modified.
There is an app called CCValidator which will tell you where the error is in your ccnet.config file. I suspect that is not where the problem is. It sounds like the error is in the ccservice.exe.config. Perhaps someone accidentally copied ccnet.config to ccservice.exe.config. The error may also be in your web dashboard's configuration.
I solved the issue by removing the build args tag.
</noconsolelogger /t:CTSx86;BuildZip /v:d>
My processor was 64 bit and I was using noconsolelogger /t:CTSx86 which is for a 32 bit processor. Anyway these were optional so I removed it worked fine.

how to call multiple project from different path in ccnet config file

I have a multiple project which is defined in ccnet.config file in below.it's very confusing to read.there is anyway, we can split these project file in some location path.and call these project file in ccnet config.please help me out for these issue.
<cruisecontrol>
<project name="project1">
...
</project>
<project name="project2">
...
</project>
</cruisecontrol>
It's better to use the pre-processor, it will also the system when one of the sub-files change.
http://www.cruisecontrolnet.org/projects/ccnet/wiki/Configuration_Preprocessor
You can look at an example here :
http://www.cruisecontrolnet.org/projects/ccnet/wiki/Scenarios
Step 2 Build on Check-in, and next steps.
It will show you how that example config grows when there are new requirements for the build server.
<!DOCTYPE cruisecontrol [
<!ENTITY project1 SYSTEM "file:project1.xml">
<!ENTITY project2 SYSTEM "file:project2.xml">
]>
<cruisecontrol>
&project1;
&project2;
</cruisecontrol>
From:
http://www.cruisecontrolnet.org/projects/ccnet/wiki/TheCruiseControlConfigurationBlock
Note, the one "gotcha" is that if you change any of the "sub-file"'s, the system will not recycle ....... (as it would if you made a change to ccnet.config ).
The work around is to change the sub-file, then add a space (or take a space) (or some other whitespace character) in the ccnet.config file).

MSBuild: Permanently Change PropertyGroup Property of a Project

I was hoping to find a way to set a value in my csproj file during my build to a value. Is there a task in MSBuild that I can use to set a property permanently to a value? In the example below, can I set CustomValue = Yes permanently?
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
.....
<CustomValue>XXXX</CustomValue
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids></ProjectTypeGuids>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
</PropertyGroup>
You can use the XmlPoke task to do that. It seems a little odd to be altering projects this way though. Alternatively, you can set up a tiny import file,
<!-- in your main project file, right below the PropertyGroup -->
<Import
Condition="Exists('Custom.props')"
Project="Custom.props"
/>
Then dynamically create this property file, as,
<?xml version="1.0" encoding="utf-8"?>
<Project
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="4.0">
<PropertyGroup>
<CustomValue>True</CustomValue>
</PropertyGroup>
</Project>
You can either use XmlPoke on just this .props file, or use WriteLinesToFile to create the entire file. This secondary file wouldn't need to be checked into source control, the condition on the import makes the project functional when the file doesn't exist.
The XmlPoke task would look like this,
<XmlPoke
XmlInputPath="./Custom.props"
Namespaces="<Namespace Prefix='x'
Uri='http://schemas.microsoft.com/developer/msbuild/2003'/>"
Query="//x:PropertyGroup/x:CustomValue/#Value"
Value="True"
/>

Resources