Can't build with NAnt

I'm getting errors trying to build with NAnt. First it couldn't create the listener type:

BUILD FAILED Error creating listener of type

'JetBrains.BuildServer.NAntLoggers.NAntListener'. Could not load type JetBrains.BuildServer.NAntLoggers.NAntListener.
-



So I copied nant and the logger into the ___NAnt.build.patch\ directory and ran the command line TeamCity was generating. The first problem is the extra quotations around

"-extension:"C:\BuildAgent\work\External Modules___NAnt.build.patch\JetBrains.BuildServer.NAntLoggers.dll""

cause it to not scan the DLL for listeners. Removing those quotes then lead to this error:
-


Scanning assembly "JetBrains.BuildServer.NAntLoggers" for extensions
.

BUILD FAILED

Failure scanning "C:\TeamCity\buildAgent\work\RosterOne Web___NAnt.build.patch\JetBrains.BuildServer.NAntLoggers.dll" for extensions.
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Stacktrace:

Failure scanning "C:\TeamCity\buildAgent\work\RosterOne Web___NAnt.build.patch\JetBrains.BuildServer.NAntLoggers.dll" for extensions.:
NAnt.Core.BuildException: Failure scanning "C:\TeamCity\buildAgent\work\RosterOne Web___NAnt.build.patch\JetBrains.BuildServer.NAntLoggers.dll" for extensions.
---> System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.Module.GetTypesInternal(StackCrawlMark& stackMark)
at System.Reflection.Assembly.GetTypes()
at NAnt.Core.TypeFactory.ScanAssembly(Assembly assembly, Task task) in d:\Source\nant-20060428T085626Z\src\NAnt.Core\TypeFactory.cs:line 114
at NAnt.Core.TypeFactory.ScanAssembly(String assemblyFile, Task task) in d:\Source\nant-20060428T085626Z\src\NAnt.Core\TypeFactory.cs:line 95
at NAnt.Core.Tasks.LoadTasksTask.ExecuteTask() in d:\Source\nant-20060428T085626Z\src\NAnt.Core\Tasks\LoadTasks.cs:line 148
--- End of inner exception stack trace ---
at NAnt.Core.Tasks.LoadTasksTask.ExecuteTask() in d:\Source\nant-20060428T085626Z\src\NAnt.Core\Tasks\LoadTasks.cs:line 154
at NAnt.Core.Task.Execute() in d:\Source\nant-20060428T085626Z\src\NAnt.Core\Task.cs:line 171
at NAnt.Core.ConsoleDriver.LoadExtensionAssemblies(StringCollection extensionAssemblies, Project project) in d:\Source\nant-20060428T085626Z\src\NAnt.Core\Co
nsoleDriver.cs:line 404
at NAnt.Core.ConsoleDriver.Main(String[] args) in d:\Source\nant-20060428T085626Z\src\NAnt.Core\ConsoleDriver.cs:line 104


I've tried running against several nightly builds, including the same version of NAnt.Core that JetBrains.BuildServer.NAntLoggers.dll was built against.

Is the NAnt runner working for anyone?

3 comments
Comment actions Permalink

Hello Dave,

Thank you for request. What is the NAnt and TC versions you use?
What .NET Framework do you use?

Every time build starts TC create sandbox with a copy of NAnt
in the directory like ___NAnt.build.patch. After the end of the build (no matter the result) it will delete this folder. -- Eugene Petrenko JetBrains, Inc http://www.jetbrains.com "Develop with pleasure!" DN> I'm getting errors trying to build with NAnt. First it couldn't DN> create the listener type: DN> DN> BUILD FAILED Error creating listener of type DN> DN> 'JetBrains.BuildServer.NAntLoggers.NAntListener'. Could not load DN> type JetBrains.BuildServer.NAntLoggers.NAntListener. DN> DN>]]> -


DN> -


DN>
DN> So I copied nant and the logger into the ___NAnt.build.patch\
DN> directory and ran the command line TeamCity was generating. The
DN> first problem is the extra quotations around
DN>
DN> "-extension:"C:\BuildAgent\work\External
DN> Modules___NAnt.build.patch\JetBrains.BuildServer.NAntLoggers.dll""
DN>
DN> cause it to not scan the DLL for listeners. Removing those quotes
DN> then lead to this error:
DN> -


DN> -


DN> Scanning assembly "JetBrains.BuildServer.NAntLoggers"
DN> for extensions
DN> .
DN> BUILD FAILED
DN>
DN> Failure scanning "C:\TeamCity\buildAgent\work\RosterOne
DN> Web___NAnt.build.patch\JetBrains.BuildServer.NAntLoggers.dll" for
DN> extensions.
DN>
DN> Unable to load one or more of the requested types. Retrieve the
DN> LoaderExceptions property for more information.
DN>
DN> Stacktrace:
DN>
DN> Failure scanning "C:\TeamCity\buildAgent\work\RosterOne
DN> Web___NAnt.build.patch\JetBrains.BuildServer.NAntLoggers.dll" for
DN> extensions.:
DN>
DN> NAnt.Core.BuildException: Failure scanning
DN> "C:\TeamCity\buildAgent\work\RosterOne
DN> Web___NAnt.build.patch\JetBrains.BuildServer.NAntLoggers.dll" for
DN> extensions.
DN>
DN> ---> System.Reflection.ReflectionTypeLoadException: Unable to load
DN> one or more of the requested types. Retrieve the LoaderExceptions
DN> property for more information.
DN>
DN> at System.Reflection.Module.GetTypesInternal(StackCrawlMark&
DN> stackMark)
DN>
DN> at System.Reflection.Assembly.GetTypes()
DN>
DN> at NAnt.Core.TypeFactory.ScanAssembly(Assembly assembly, Task task)
DN> in d:\Source\nant-20060428T085626Z\src\NAnt.Core\TypeFactory.cs:line
DN> 114
DN>
DN> at NAnt.Core.TypeFactory.ScanAssembly(String assemblyFile, Task
DN> task) in
DN> d:\Source\nant-20060428T085626Z\src\NAnt.Core\TypeFactory.cs:line 95
DN>
DN> at NAnt.Core.Tasks.LoadTasksTask.ExecuteTask() in
DN> d:\Source\nant-20060428T085626Z\src\NAnt.Core\Tasks\LoadTasks.cs:lin
DN> e 148
DN>
DN> --- End of inner exception stack trace ---
DN>
DN> at NAnt.Core.Tasks.LoadTasksTask.ExecuteTask() in
DN> d:\Source\nant-20060428T085626Z\src\NAnt.Core\Tasks\LoadTasks.cs:lin
DN> e 154
DN>
DN> at NAnt.Core.Task.Execute() in
DN> d:\Source\nant-20060428T085626Z\src\NAnt.Core\Task.cs:line 171
DN>
DN> at NAnt.Core.ConsoleDriver.LoadExtensionAssemblies(StringCollection
DN> extensionAssemblies, Project project) in
DN> d:\Source\nant-20060428T085626Z\src\NAnt.Core\Co
DN>
DN> nsoleDriver.cs:line 404
DN>
DN> at NAnt.Core.ConsoleDriver.Main(String[] args) in
DN> d:\Source\nant-20060428T085626Z\src\NAnt.Core\ConsoleDriver.cs:line
DN> 104
DN>
DN> I've tried running against several nightly builds, including the
DN> same version of NAnt.Core that JetBrains.BuildServer.NAntLoggers.dll
DN> was built against.
DN>
DN> Is the NAnt runner working for anyone?
DN>


0
Comment actions Permalink

Hello Dave,

Thank you for request. What is the NAnt and TC versions you use?
What .NET Framework do you use?

Every time build starts TC create sandbox with a copy of NAnt
in the directory like ___NAnt.build.patch. After the end of the build (no matter the result) it will delete this folder. -- Eugene Petrenko JetBrains, Inc http://www.jetbrains.com "Develop with pleasure!" DN> I'm getting errors trying to build with NAnt. First it couldn't DN> create the listener type: DN> DN> BUILD FAILED Error creating listener of type DN> DN> 'JetBrains.BuildServer.NAntLoggers.NAntListener'. Could not load DN> type JetBrains.BuildServer.NAntLoggers.NAntListener. DN> DN>]]> -


DN> -


DN>
DN> So I copied nant and the logger into the ___NAnt.build.patch\
DN> directory and ran the command line TeamCity was generating. The
DN> first problem is the extra quotations around
DN>
DN> "-extension:"C:\BuildAgent\work\External
DN> Modules___NAnt.build.patch\JetBrains.BuildServer.NAntLoggers.dll""
DN>
DN> cause it to not scan the DLL for listeners. Removing those quotes
DN> then lead to this error:
DN> -


DN> -


DN> Scanning assembly "JetBrains.BuildServer.NAntLoggers"
DN> for extensions
DN> .
DN> BUILD FAILED
DN>
DN> Failure scanning "C:\TeamCity\buildAgent\work\RosterOne
DN> Web___NAnt.build.patch\JetBrains.BuildServer.NAntLoggers.dll" for
DN> extensions.
DN>
DN> Unable to load one or more of the requested types. Retrieve the
DN> LoaderExceptions property for more information.
DN>
DN> Stacktrace:
DN>
DN> Failure scanning "C:\TeamCity\buildAgent\work\RosterOne
DN> Web___NAnt.build.patch\JetBrains.BuildServer.NAntLoggers.dll" for
DN> extensions.:
DN>
DN> NAnt.Core.BuildException: Failure scanning
DN> "C:\TeamCity\buildAgent\work\RosterOne
DN> Web___NAnt.build.patch\JetBrains.BuildServer.NAntLoggers.dll" for
DN> extensions.
DN>
DN> ---> System.Reflection.ReflectionTypeLoadException: Unable to load
DN> one or more of the requested types. Retrieve the LoaderExceptions
DN> property for more information.
DN>
DN> at System.Reflection.Module.GetTypesInternal(StackCrawlMark&
DN> stackMark)
DN>
DN> at System.Reflection.Assembly.GetTypes()
DN>
DN> at NAnt.Core.TypeFactory.ScanAssembly(Assembly assembly, Task task)
DN> in d:\Source\nant-20060428T085626Z\src\NAnt.Core\TypeFactory.cs:line
DN> 114
DN>
DN> at NAnt.Core.TypeFactory.ScanAssembly(String assemblyFile, Task
DN> task) in
DN> d:\Source\nant-20060428T085626Z\src\NAnt.Core\TypeFactory.cs:line 95
DN>
DN> at NAnt.Core.Tasks.LoadTasksTask.ExecuteTask() in
DN> d:\Source\nant-20060428T085626Z\src\NAnt.Core\Tasks\LoadTasks.cs:lin
DN> e 148
DN>
DN> --- End of inner exception stack trace ---
DN>
DN> at NAnt.Core.Tasks.LoadTasksTask.ExecuteTask() in
DN> d:\Source\nant-20060428T085626Z\src\NAnt.Core\Tasks\LoadTasks.cs:lin
DN> e 154
DN>
DN> at NAnt.Core.Task.Execute() in
DN> d:\Source\nant-20060428T085626Z\src\NAnt.Core\Task.cs:line 171
DN>
DN> at NAnt.Core.ConsoleDriver.LoadExtensionAssemblies(StringCollection
DN> extensionAssemblies, Project project) in
DN> d:\Source\nant-20060428T085626Z\src\NAnt.Core\Co
DN>
DN> nsoleDriver.cs:line 404
DN>
DN> at NAnt.Core.ConsoleDriver.Main(String[] args) in
DN> d:\Source\nant-20060428T085626Z\src\NAnt.Core\ConsoleDriver.cs:line
DN> 104
DN>
DN> I've tried running against several nightly builds, including the
DN> same version of NAnt.Core that JetBrains.BuildServer.NAntLoggers.dll
DN> was built against.
DN>
DN> Is the NAnt runner working for anyone?
DN>


0
Comment actions Permalink

Thanks, I was using build 14xx (can't remember exact build number). I just grabbed the latest build and it works fine now.

Thanks again,

Dave

0

Please sign in to leave a comment.