RobotStudio event

.NET 4 ABB exception ?


I have tried a couple of compiler options, but I can't get rid of this one...


2011-01-12 15:24:26,523 WARN [1] {xyz.Rap.RapMachine.Discovery} Failed to load Abb robots during discovery
System.TypeInitializationException: The type initializer for 'ABB.Robotics.Controllers.Internal.NetworkScanner' threw an exception. ---> System.IO.FileLoadException: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
   at ABB.Robotics.Controllers.Internal.NetworkScanner..ctor()
   at ABB.Robotics.Controllers.Internal.NetworkScanner..cctor()
   --- End of inner exception stack trace ---
   at ABB.Robotics.Controllers.Internal.NetworkScanner.get_Instance()
   at ABB.Robotics.Controllers.Discovery.NetworkScanner..ctor()
  {mine at x.y.z. call stack pops up here}

Suggestions anyone?
Laro882011-01-12 16:00:58

Comments

  • This is apparently not related to ABB. This happens when using the ABB dlls inside a project using rev. 4 of the framework. Downgrading to 3.5 works fine.

    This might however be fixable by ABB by recompiling the dll's using some special options, I haven't spend any time looking for these options though.

  • I'm having the same issue.  Would prefer not to downgrade to 4.  Any other solutions out there?

    Thanks,
    Dan
  • Found an answer....put this in your app config file:

    <configuration>
      <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0"/>
      </startup>
    </configuration>
  • That actually worked like a charm, however the 64bit issue remains.
  • Micky
    Micky ✭✭✭

    Hi,

    which version of Visual Studio  do you use?

    PC-SDK 5.60 uses the .NET Framework 4.5, so that at least Visual Studio 2012 or 2013 should be used for developing.

     

    /BR

    Micky