WP8.1 Listpicker throws (Error HRESULT E_Fail has been returned from a call to a COM component) - windows-phone-8

Windows Phone Databound project targeting WP 8.1 OS.
Added WPToolkit through NuGet
Added toolkit reference to the page:
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
Added a list picker and gave it items source.
When I deploy to the phone it is working just fine. But in the designer I get this error, and it's pretty annoying, I was wondering if I can do something about it?
UPDATE:
Restarting visual studio solved the problem.

Related

How to use third party dll in windows phone 8.1 application with windows runtime component?

I have created the windows phone 8.1 application in which I want to use third party dll file. That's why I have created windows runtime component for the windows phone project. I have given reference of the runtime component to the windows phone 8.1 application project.
In windows runtime component, I have set the additional Include directory path. Moreover, I have also set the Linker -> Input ->additional dependencies as lib file listing. I have drag drop all dll files in my c# windows phone application main project folder and set build action as content and copy output directory as copy always.
However, I got the following error.
An exception of type 'System.IO.FileNotFoundException' occurred in App1.WindowsPhone.exe but was not handled in user code
I have checkout the following question. But did not resolve it.
How to use a C++ dll in Windows Phone 8.1 XAML App within C++ Runtime Component
I found the answer. All the dependencies has been set properly. There was an issue in the dll file which architecture does not match with the current platform.
After created the build for proper architecture, it works.

Error when set project in release mode - Windows Phone 8.1

Am porting my Windows Phone 8 app to Windows Phone 8.1 and everything is working fine in debug mode. But when I set in release mode and while building the application, I get the error,
The type of namespace "FlickGestureEventArgs" could not be found
The type of namespace "ShakeGestureEventArgs" could not be found
How to overcome this? I couldn't launch the app certification kit when in debug mode.
Got solution for my own question and here is my answer.
First I re-installed the WP toolkit from nuget using the command
Install-Package WPtoolkit
So that I can able to solve FlickGestureEventArgs. And similarly I thought this will be solution to my another problem ShakeGestureEventArgs. Started searching for the new ShakeGesture.dll and find that in below link.
ShakeGesture.dll
Now my problem is solved. If you are facing the same issues, just re install the packages which shows error and you can able to solve it.

Windows Phone - Admob in Visual Studio 13 not working

i try to implement Admob in my windowsphone app using visual studio 2013 ultimate on windows 8.
When I try to implement the dll I get the error which sais, that I cannot add a refrence to a higher version or implement an incompatible assembly...
When I use the example code I get it working, but only with the error that the namespace is not found (still working somehow) - however, I cannot use the designer anymore until the error is fixed... Any Idea?
Thanks
I found the solution and want to provide it to you:
Since the Admob dll was in a zip file I had to unblock it.
Go to unpacked dll -> rightclick -> properties -> Allow / Unblock at the bottom of the file
After this I could ad the reference.

WP8 - Re-using a native DLL through Windows Runtime Component

I have a native dll that I'd like to use in a WP8 project that I'm working on. I've done some research and have created a C++ Windows Runtime Component (WRC) to wrap the native DLL. The WRC project uses a .lib file, and my WP8 application calls the WRC project.
My solution compiles all fine, but when my application makes a call to a method in the native DLL, I get a The specified module could not be found. (Exception from HRESULT: 0x8007007E) exception.
From reading around it seems like the dll is not being loaded. I've copied all relevant dlls to the output dir of where the .exe file is and also in various places but the error keeps showing up.
If anyone could point me in the right direction I'd be very grateful. Also if more info is required I'll post that up also.
The DLL must be included in your XAP package. Something you can see being taken care of in the Output window when you build your app, it starts with the "Begin Xap packaging" messages and then lists all the files that get added. The runtime error says it is not being included.
There is remarkably little guidance on how to ensure that a file gets included in a phone package when MSBuild cannot figure out the dependencies by itself. It certainly won't for your DLL, no way the build system can tell if it isn't a project in your solution. Seems you're operating a bit on the bleeding edge in this case :)
But this works well when I try it, going by the MSBuild output and not by actually testing it: Project + Add Existing Item. Navigate to your DLL and select it. Select it in the Solution Explorer window and look in the Properties window. Ensure that "Build Action" = Content, Copy to Output Directory = "Copy if newer". Rebuild, you'll now see the file getting added to the XAP. Which should solve this particular error. There might be others :)
Windows Desktop or Windows Store native DLLs are not binary compatible with Windows Phone, even if they are built for the same CPU architecture.
Therefore you will need to recompile your native DLL for the Windows Phone toolset.
About Windows Runtime Components:
On Windows Phone a Windows Runtime Component is itself a native DLL (.NET is not supported on the phone). The binaries of Windows Runtime Components cannot be shared between Windows Store apps and Windows Phone apps.

unable to debug directx interop com in the default windows phone 8 project in visual studio 2012

I created the default vc++ windows phone 8 directx/xaml solution. It created two project files. one xaml project and another native directx com interop dll. I checked my project is in debug mode, but still I'm unable to debug/step through the com interop dll code, but can step through cs code..
any idea how I can debug directx dll?
Open your XAML C# project properties, go to debug tab and select "Native only" in "UI Task" combobox in "Debugger Type" section.
The reason for your problem is that there is no mixed-mode (both .NET and Native) debugger for Windows Phone, so you have to choose which code you would like to debug prior to running your application.