Hi All,
first all thanks for Ncrunch. I used in the past without any problem.
Now with a new project (empty for now), just a proof of concept I have this error:
An error occurred while analysing this project after it was built: System.NullReferenceException: Object reference not set to an instance of an object.
at NUnit.Core.Builders.NUnitTestFixtureBuilder.BuildSingleFixture(Type type, Attribute attr)
at NUnit.Core.Builders.NUnitTestFixtureBuilder.BuildMultipleFixtures(Type type, Attribute[] attrs)
at NUnit.Core.Builders.NUnitTestFixtureBuilder.BuildFrom(Type type)
at NUnit.Core.Extensibility.SuiteBuilderCollection.BuildFrom(Type type)
at NUnit.Core.TestFixtureBuilder.BuildFrom(Type type)
at NUnit.Core.Builders.TestAssemblyBuilder.GetFixtures(Assembly assembly, String ns)
at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, Boolean autoSuites)
at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, String testName, Boolean autoSuites)
at NUnit.Core.TestSuiteBuilder.Build(TestPackage package)
at nCrunch.TestExecution.Frameworks.NUnit.NUnitDynamicTestFinder.FindFrameworkTestsUsingRuntimeInvoke(TestPackage package, ILogger logger, List`1 tests)
at nCrunch.TestExecution.Frameworks.NUnit.NUnitTestFramework.FindFrameworkTestsInAssembly(ReflectedAssembly assembly, String assemblyFilePath, String[] referencedAssemblyFilePaths)
at nCrunch.TestExecution.TestFinder.FindTestsForFrameworks(ReflectedAssembly assembly, String assemblyFilePath, String[] referencedAssemblyFilePaths, TestFrameworkDescription[] frameworks)
at nCrunch.TestExecution.RemoteTaskRunner.AnalyseAssembly(TestFrameworkDescription[] applicableFrameworks)
VS 2010
.net 4
this the library on the failed project
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Moq" version="4.0.10827" targetFramework="net40" />
<package id="NUnit" version="2.6.1" targetFramework="net40" />
<package id="structuremap" version="2.6.4.1" targetFramework="net40" />
<package id="structuremap.automocking" version="2.6.4.1" targetFramework="net40" />
</packages>
can anyone help me?
thanks
Daniele
Build/Test Issues
An error occurred while analysing this project after it was built: System.NullReferenceException
Started by Daniele on 7,787 views
Remco NCrunch Developer
#2911
03 Oct 2012 21:04 UTC
Hi Daniele,
Thanks for posting!
This is an internal NUnit issue that I would guess is being caused somehow by the structure of one of your tests/fixtures. Is there any chance I could take a look at this source code? If you only have a few tests in the project, a copy/paste of this would be fine (if you are able to do so).
Something that may make a difference is to downgrade your NUnit dependency to 2.6.0. I'm not sure if this will have an impact on the other components you are using, though it could help to confirm whether this is problem is related to your NUnit version (1.41b of NCrunch uses NUnit 2.6.0).
Cheers,
Remco
Thanks for posting!
This is an internal NUnit issue that I would guess is being caused somehow by the structure of one of your tests/fixtures. Is there any chance I could take a look at this source code? If you only have a few tests in the project, a copy/paste of this would be fine (if you are able to do so).
Something that may make a difference is to downgrade your NUnit dependency to 2.6.0. I'm not sure if this will have an impact on the other components you are using, though it could help to confirm whether this is problem is related to your NUnit version (1.41b of NCrunch uses NUnit 2.6.0).
Cheers,
Remco
Hi,
I think you are right. In the project where Nchrunch works I use:
<package id="NUnit" version="2.6.0.12054" />
Let me see if I can fix changing the version.
public class AutoMockBase<T> : MockBase where T : class
{
public MoqAutoMocker<T> AutoMocker { get; set; }
#region Setup/Teardown
[SetUp]
public override void SetUp()
{
base.SetUp();
AutoMocker = new MoqAutoMocker<T>();
AutoMocker.MockObjectFactory(); }
.....
}
[TestFixture]
public abstract class MockBase
{
#region Setup/Teardown
[SetUp]
public virtual void SetUp()
{
}
[TearDown]
public virtual void TearDown()
{
Container = null;
}
....
}
I think you are right. In the project where Nchrunch works I use:
<package id="NUnit" version="2.6.0.12054" />
Let me see if I can fix changing the version.
public class AutoMockBase<T> : MockBase where T : class
{
public MoqAutoMocker<T> AutoMocker { get; set; }
#region Setup/Teardown
[SetUp]
public override void SetUp()
{
base.SetUp();
AutoMocker = new MoqAutoMocker<T>();
AutoMocker.MockObjectFactory(); }
.....
}
[TestFixture]
public abstract class MockBase
{
#region Setup/Teardown
[SetUp]
public virtual void SetUp()
{
}
[TearDown]
public virtual void TearDown()
{
Container = null;
}
....
}
let me suggest something if i can:
Will be great if you can make overridable the version of the components like Nunit etc.
Give a better message on the error (the version is quite easy to fix the problem)
Write the requirement fro Ncrunch. I didn't find them anywhere.
for the rest is a great tool.
Will be great if you can make overridable the version of the components like Nunit etc.
Give a better message on the error (the version is quite easy to fix the problem)
Write the requirement fro Ncrunch. I didn't find them anywhere.
for the rest is a great tool.
Edited 04 Oct 2012 07:59 UTC
Remco NCrunch Developer
#2918
03 Oct 2012 22:14 UTC
I'll note the NUnit 2.6.1 issue down to be resolved in a future build, hopefully v1.42. Thanks for making me aware of it!
Cheers,
Remco
Cheers,
Remco
Post a reply
Log in to reply.