Getting BadImageFormatException on Win 8.1 with additional information:is not a valid Win32 application. Not sure what is going on.
at System.StubHelpers.StubHelpers.GetWinRTFactoryObject(IntPtr pCPCMD)
at Telerik.Storage.Database.GetOrCreateDatabase(String databaseName, DatabaseLocation location)
at Telerik.Storage.Extensions.Context..ctor(String databaseName, DatabaseLocation location)
at ScriptureMemoryWindows.ViewModels.PassageViewModel..ctor(INavigationService navigationService)
6 Answers, 1 is accepted
Hi David,
Thank you for contacting us.
This exception is usually thrown when the configuration of the project is not correct (when you try to build your application for Any CPU) because the Data Storage uses native code that is CPU architecture dependent. Another reason could be a problem with the references. You have to add a reference to the Microsoft Visual C++ Runtime Package. You can look at this article from our online documentation that contains information about how to setup a project with Data Storage: Data Storage - Getting Started
I hope this is useful. Please, do not hesitate to contact us if you have further questions.
Regards,Rositsa Topchiyska
Telerik
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
Following your directions in your link only gets me a Windows 8 version. I need Windows 8.1.
The Any CPU to x86 fixed the issue.
The information in our online documentation is a bit outdated. In the latest version of the controls the Data Storage is installed with the Rad Controls for Windows 8/8.1 XAML installer. We apologize for any inconvenience caused and we will update our documentation right away.
To install the 8.1 version of the Data Storage, navigate from your account to > Products & Subscriptions > DevCraft Complete > Installer and other resources > RadControls for Windows 8 XAML > download Windows 8.1 Automatic installation. Please, make sure that you have uninstalled the current version of Data Storage before you run the installer.
I hope this helps. Feel free to contact us if you have further questions.
Regards,
Rositsa Topchiyska
Telerik
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
I am getting this same error on a Windows 8.1 Phone when deploying directly to the device.
If I set the configuration of the solution to ARM and Debug mode, I am able to deploy to the device and run the app with no problems.
If I set the configuration of the solution to ARM and Release mode, I get an exception as soon as it calls Telerik.Storage.Extensions.Context. The message from the exception is "The specified module could not be found".
Stack Trace:
at System.StubHelpers.StubHelpers.GetWinRTFactoryObject(IntPtr pCPCMD)
at Telerik_Storage.Database.GetOrCreateDatabase(String databaseName, DatabaseLocation location)
at Telerik.Storage.Extensions.Context..ctor(String databaseName, DatabaseLocation location)
Am I supposed to configure something different in release mode to include everything?
In case anyone stumbles across this, I've found a more relevant thread and am working from it now.
http://www.telerik.com/forums/urgent-release-configuration-throws-exception-0x8007007e#3hzaJf3fb0y5BcXz7miMog
Could you please try to download our latest Q2 2015 release and see if this helps because we have some fixes in this direction.
If this does not help, please send me a sample project so I will be able to further investigate the issue.
I am looking forward to your reply.
Regards,
Ivaylo Gergov
Telerik