11-03-2011 11:42 AM
I am trying to run a .net action in TS 3.5. I receive "object reference not set to an instance of an object error"
Actually this is the first time i have to call a .net dll so i need some instruction.
I am not very sure if the error is due to my source code. Is there anything that i need to to take care while preparing my dll to run it from TS 3.5. I wrote the dll with C# btw.
11-03-2011 12:03 PM
You should try debugging the process with visual studio and a debug build of your assembly to see where the unset reference is being used (likely in your code). Do you have any specific questions about how to specify a call into an assembly?
Hope this helps,
-Doug
11-03-2011 12:06 PM
But my main problem is to clear out what the TS error message means? Is there any tutorial about calling .net dlls from Teststand
11-04-2011 12:07 PM - edited 11-04-2011 12:08 PM
That's not a teststand error, that's a .NET exception. That means you have a .NET reference that is set to null, yet you are trying to make a call or access data on it.
There are example sequences such as <TestStandPublic>\Examples\Demo\dotnet
There is also a help file for the panel where you fill in the settings.
-Doug
11-04-2011 12:12 PM
You will also likely get this error if you are trying to call an instance member without first creating the class. You need to configure a constructor if your method is not static. You can then store the object reference in a variable and then use it in subsequent steps.
If you are already doing this, or your methods are static, then the exception must be coming from inside your code module as Doug has suggested.
-Jeff