Edited version, after community suggestion:
In a Windows 8.1 Phone project (part of a VB.Net solution with a Store application and a portable class library), I get the following error message:
A call is not possible because VB runtime is not loaded.
but as far as I can trace, the code continues to work, despite this. Until ... in the end there will be an error telling me that
Could not find Windows Runtime type "Windows.foundation"
What I have found so far on this topic seems to be related to Silverlight and the very old versions of VB Runtime. Nothing recent.
The following explanation is then provided at runtime in the error trap:
in System.StubHelpers.WinRTTypeNameConverter.GetTypeFromWinRTTypeName (String typeName, Boolean & isPrimitive) in System.StubHelpers.SystemTypeMarshaler.ConvertToManaged (TypeNameNative * pNativeType, TypeFunction.Temple.TimePermpt.Control.Type. Dossier365.Mobile.Behaviors.MenuTegelClickAction.ReageerOpMenuKeuze (sender object, object parameter).
I added a screenshot with various posts. The Store application is working fine, based on the same PCL.
EDIT: after the suggestions below: DirectCast added:

A new error message will appear: I donโt know what is happening here or more: how to overcome this situation. My attempts so far have not led to an acceptable solution.
Anyone with a good suggestion or solution?
Peter Klein
source share