title: Error: VB runtime is not loaded
body: <p><strong>Edited version, after suggestion from community:</strong></p>
  
  <p>In a <code>Windows 8.1</code> Phone project (Part of a <code>VB.Net</code> Solution with also a Store app and a Portable Class Library) I get this error message:</p>
  
  <blockquote>
    <p>Call not possible because VB Runtime is not loaded.</p>
  </blockquote>
  
  <p>but as far as I can trace the code keeps running in spite of this. Until... eventually an error pops up, telling me that</p>
  
  <blockquote>
    <p>Could not find Windows Runtime type 'Windows.foundation'</p>
  </blockquote>
  
  <p>What I have found so far on this subject seems to have a relation with Silverlight and very old versions of VB Runtime. Nothing recent.</p>
  
  <p>Further on during execution in the error trap the following explanation is given:</p>
  
  <blockquote>
    <p>at System.StubHelpers.WinRTTypeNameConverter.GetTypeFromWinRTTypeName(String typeName, Boolean&amp; isPrimitive)
       at System.StubHelpers.SystemTypeMarshaler.ConvertToManaged(TypeNameNative* pNativeType, Type&amp; managedType)
       at Windows.UI.Xaml.Controls.Frame.Navigate(Type sourcePageType)
       at Dossier365.Mobile.Behaviors.MenuTegelClickAction.ReageerOpMenuKeuze(Object sender, Object parameter).</p>
  </blockquote>
  
  <p>I have attached a screenshot with the different messages. The Store App runs fine, based on the same PCL.</p>
  
  <p><strong>EDIT: after suggestions below: added DirectCast:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/CqqH0.png" alt="enter image description here"></p>
  
  <p>Now a new error message appears: I have no clue what goes on here or moreover: how to overcome this situation. My attempts so far have not lead to a workable solution.  </p>
  
  <p>Anyone with a good suggestion or solution?</p>