Opening Mobile Map Package Fails

Discussion created by minerjoe Champion on Mar 24, 2017
Latest reply on Mar 31, 2017 by minerjoe

I am trying to open a Mobile Map Package.  When I do I get an error that the file does not exist even though it does.


if ( File.Exists(item.MapPackagePath) )
     MobileMapPackage mapPackage = await MobileMapPackage.OpenAsync(item.MapPackagePath);

     RuntimeControls.Map = mapPackage.Maps[0];


The output from the Console.Writeline followed by the error:


System.IO.FileNotFoundException: File not found: D:\Mobile\Packages\Gas_Network.mpkx ---> Esri.ArcGISRuntime.ArcGISRuntimeException: File not found: D:\Mobile\Packages\Gas_Network.mpkx
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Esri.ArcGISRuntime.Mapping.MobileMapPackage.<OpenAsync>d__4.MoveNext()


Anyone know why it does not find a file that obviously exists?