Export to GitHub

nant-extensions - issue #3

Could not load type 'NAnt.Core.Types.PatternCollection' from assembly 'NAnt.Core, Version=0.85.2478.0, Culture=neutral, PublicKeyToken=null'.


Posted on Feb 10, 2009 by Helpful Bird

Hi,

I'm trying to get mbunit tests running on TeamCity. I'm using the following build file and under that is the exception that is thrown. Can someone tell me what I'm doing wrong or is there an example config file available?

<?xml version="1.0"?> <project name="AutomatedBuilder"> <target name="Testeke"> <loadtasks assembly="C:\nant\bin\NAntExtensions.MbUnit.dll" /> <loadtasks assembly="C:\nant\bin\NAnt.Core.dll" /> <mbunit report-types="html" report-directory="C:\Reports" verbose="true" workingdir="C:\Robinson"> <assemblies> <include name="C:\Robinson\Robinson\PresentationBridgeTest\bin\Release\PresentationBridgeTest.dll" /> </assemblies> </mbunit> </target> </project>

Exception-------------------------------------------------------

Exception has been thrown by the target of an invocation. Exception has been thrown by the target of an invocation. StackTrace: at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Reflection.Assembly.CreateInstance(String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at NAnt.Core.TaskBuilder.CreateTask() at NAnt.Core.TypeFactory.CreateTask(XmlNode taskNode, Project proj) at NAnt.Core.Project.CreateTask(XmlNode taskNode, Target target) at NAnt.Core.Target.Execute() at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies) at NAnt.Core.Project.Execute() at NAnt.Core.Project.Run()Inner Exception: Could not load type 'NAnt.Core.Types.PatternCollection' from assembly 'NAnt.Core, Version=0.85.2478.0, Culture=neutral, PublicKeyToken=null'. at NAntExtensions.MbUnit.Types.IncludeSet..ctor() at NAntExtensions.MbUnit.Tasks.MbUnitTask..ctor(IBuildEnvironment buildEnvironment) at NAntExtensions.MbUnit.Tasks.MbUnitTask..ctor()

Comment #1

Posted on Feb 10, 2009 by Helpful Bird

The xml in my first post is a test version. Below is the version I think is the most correct. Thanks!

Comment #2

Posted on Feb 10, 2009 by Helpful Bird

I think I found the solution. I've upgraded to the latest beta of Nant. Now I'm getting framework 3.5 errors so I"m also installing that.

Comment #3

Posted on Apr 14, 2009 by Grumpy Monkey

Hi Bruno,

Thanks for the feedback. As stated in the Setup page on the project wiki NAnt-Extensions are compiled for NAnt 0.86 beta 1.

Kind regards, Marnix

Status: WontFix

Labels:
Type-Defect Priority-Medium