chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
0 votes

After I had enabled logging in the NAnt TypeMockStartTask, I got a System.NullReferenceException.
Here is the stack trace extracted from the NAnt log file:
Internal Error: System.NullReferenceException
Object reference not set to an instance of an object.

at TypeMock.NAntBuild.TypeMockStartTask.GetTypeMockDir()
at TypeMock.NAntBuild.TypeMockStartTask.b()
at TypeMock.NAntBuild.TypeMockStartTask.ExecuteTask()
at NAnt.Core.Task.Execute()
at NAnt.Core.Target.Execute()
at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies)
at NAnt.Core.Project.Execute()
at NAnt.Core.Project.Run()

And here is the relevant portion of the NAnt build script:
    loglevel="9" />

The exception doesn't occur if I also specify a logging output directory, with the logpath attribute.

What could the problem be here?

Kind regards,
asked by megakemp (3k points)

2 Answers

0 votes
Hi Enrico
It seems that you have found a :twisted: bug.
Thanks for reporting this, we will investigate this and report back to you.
answered by scott (32k points)
0 votes
Hi Scott,

I tried to run TypeMock in our build script with some different options, and it seems that the error occurs when I specify the loglevel attribute. The logpath attribute does not seem to have an influence, in contrary of what I wrote earlier.

By the way, we are running TypeMock

Kind regards,
answered by megakemp (3k points)