In my windows 8.1 app I use the Bing Maps SDK to get driving directions to a location.
When I attempt to call this line
Waypoint begin = new Waypoint(new Location(current.Latitude, current.Longitude));
I get a System.TypeLoadException with the error
Requested Windows Runtime type 'Bing.Maps.Directions.Waypoint' is not registered
If I remove and reload the Bing Maps dll from the project it starts working again however when I package the app up for release it still crashes. If I close the project and reopen it I get this crash again.
this is the stack trace
System.TypeLoadException: Requested Windows Runtime type 'Bing.Maps.Directions.Waypoint' is not registered. ---> System.Runtime.InteropServices.COMException: Class not registered
(Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
--- End of inner exception stack trace ---
at System.StubHelpers.StubHelpers.GetWinRTFactoryObject(IntPtr pCPCMD)
at Bing.Maps.Directions.Waypoint..ctor(Location location)
at MobileMap_Win8.Pages.CurrentIncident.NavigationPage.<CalculateRoute>d__18.MoveNext()
The map itself displays fine, current has a valid location so I dont know what the problem is.
this is the SDK I downloaded
https://visualstudiogallery.msdn.microsoft.com/224eb93a-ebc4-46ba-9be7-90ee777ad9e1