RobotStudio event

about a exception "System.TypeInitializationException" when using PC SDK

Tyler
Tyler
edited May 2014 in Developer Tools

I have referenced this two .dll files (ABB.Robotics.dll and ABB.Robotics.Controllers.dll). I created a button and added a click event. In the click event function, I write one line code " NetworkScanner ns = new NetworkScanner();" Also I have added the using instruction

using ABB.Robotics;
using ABB.Robotics.Controllers;
using ABB.Robotics.Controllers.Discovery;
using ABB.Robotics.Controllers.RapidDomain;

But when I run this instruction, the exception has came out

An unhandled exception of type 'System.TypeInitializationException' occurred in ABB.Robotics.Controllers.dll

Additional information: The type initializer for 'ABB.Robotics.Controllers.Internal.NetworkScanner' threw an exception.

Thank you very much.

Tagged:

Best Answer

Answers

  • Tyler said:

    I have referenced this two .dll files (ABB.Robotics.dll and ABB.Robotics.Controllers.dll). I created a button and added a click event. In the click event function, I write one line code " NetworkScanner ns = new NetworkScanner();" Also I have added the using instruction

    using ABB.Robotics;
    using ABB.Robotics.Controllers;
    using ABB.Robotics.Controllers.Discovery;
    using ABB.Robotics.Controllers.RapidDomain;

    But when I run this instruction, the exception has came out

    An unhandled exception of type 'System.TypeInitializationException' occurred in ABB.Robotics.Controllers.dll

    Additional information: The type initializer for 'ABB.Robotics.Controllers.Internal.NetworkScanner' threw an exception.

    Thank you very much.

    Hello,Tyler. your problem has been solved? I use the 6.03 version of the dll, also encountered the same problem has not resolved, can share with your experience, thank you very much.