Windows.Networking.BackgroundUploader gives HRESULT: 0x80040154(REGDB_E_CLASSNOTREG) error - c#

I am trying to implement Windows.Networking.BackgroundUploader in a Windows Phone 8.1 Silverlight app, which I've read is now possible. However, when I call CreateUpload I get
Class not registered (Exception from HRESULT: 0x80040154(REGDB_E_CLASSNOTREG))
The Windows.Networking namespace is added fine and the project builds ok.
If I create a new Windows Phone 8.1 Universal app, I can see that there are two 'Windows' references in the Object Browser, but in the Silverlight version only one is added and the Windows.Networking reference is missing. This looks like the cause of the error then. My question is, how do I add the 'right' reference to the Silverlight project? Or am I missing something else?
Thanks in advance.

You need to select option: "Internet (Client & Server)" in your projects' Package.appxmanifest file.
MORE INFORMATION:
A Windows Phone 8.1 Silverlight app has both WMAppManifest.xml and Package.appxmanifest files.
When you upgrade a Windows Phone 8.0 Silverlight project to Windows Phone 8.1 it adds the file: "Package.appxmanifest" which contains the packaging requirements for Windows Phone 8.1 specific features.
For more details see http://msdn.microsoft.com/en-us/library/windows/apps/dn642081(v=vs.105).aspx

Related

Are Windows Phone 8.0 DLLs compatible with Windows Phone 8.1 apps?

I have a Windows Phone 8.1 project, and a Windows Phone 8.0 library.
I need to add it into my Windows Phone 8.1 project; but at runtime, I have the following error:
FileNotFoundException: could not load or assembly Microsoft.Phone,
Version=8.0.0.0. The system cannot find the file specified.
So my question is simple: are 8.0 libs compatible with Windows Phone 8.1 app ?
If not, what should I do ? Migrate them ?
If your project is Windows Phone 8.1 Silverlight, that it should work fine. If your project is Windows Phone 8.1 XAML (which seems more probable according to the error message) , then no, no way to use it without rewriting.

How can i import windows.media.capture in my WPF project?

I am really confused about windows media capture namespace, I would like to import the namespace to develop camera function in windows 8.1.
FYI, I developed using visual studio 2013 and windows 7 64 bit, i already tried to install windows 8 Software Development Kits also, but i still can't find the namespace.
Am I missing something?
Finally I've done developing app for windows 8.1 Table in Windows 7 x64 and want to share some experience that i had in here.
Steps :
Edit .csproject in wpf app (Add <TargetPlatformVersion>8.1</TargetPlatformVersion> Inside <PropertyGroup> )
Add "Windows" library Reference
Load some .Net Framework 4 Library (System.Runtime.dll, System.Runtime.InteropServices.WindowsRuntime.dll,System.Threading and System.Threading.Task ) the location usually in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
Load System.Runtime.WindowsRuntime.dll (C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETCore\v4.5)
But we cannot debug the application because have different runtime with windows 7, we only can build and deploy to the Windows 8.1 Tablet.
I've done implementing camera function, GPS and database operation using MSSQLServer Compact DB Express 2014.
Reference :
http://blogs.msdn.com/b/eternalcoding/archive/2013/10/29/how-to-use-specific-winrt-api-from-desktop-apps-capturing-a-photo-using-your-webcam-into-a-wpf-app.aspx
Error calling async method synchronously
Windows.media.capture minimum supported client is windows 8 and minimum supported phone is windows phone 8.1.
Check this Article from MSDN

Does IBM MobileFirst support native C#/Xaml apps for windows phone 8.1/windows 8.1?

To further clarify the title.
I don't mean HTML5 hybrid apps or apps that have been developed for windows 8/ windows phone 8 and run on windows 8.1/ windows phone 8.1
I would like to know if IBM MobileFirst supports native apps written for windows 8.1 and/or windows phone 8.1 .
For example a universal app.
From what I have read and the tutorials I've seen there is no way to generate dlls for windows 8.1 and windows phone 8.1. Am I missing something?
Have you taken a look at the IBM MobileFirst Platform Developer Center or the IBM MobileFirst Platform Knowledge Center? you'll find your answers there...
Windows Phone 8 - There are tutorials for Native Windows Phone 8.x development (more to come in the future).
https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-native-wp8-development-6-3/
http://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.dev.doc/dev/c_developing_native_apps_wp8.html
Windows 8 - Native Windows 8 support is also available (but not yet mentioned in the dev center)
http://www-01.ibm.com/support/knowledgecenter/SSHS8R_6.3.0/com.ibm.worklight.dev.doc/dev/c_developing_native_apps_w8.html
Search the Knowledge Center for more information...
#corus I was able to reproduce your problem consistently! What fixed was the changing the build action of the wlclient.properties file to Content.
Go to solution explorer
Right click on wlclient.properties and select "Properties"
Set the "Build action" property to "Content" (this is missing in the knowledge center)
Also set the "Copy to output directory" to "always"
This should fix the crash issue.
#corcus Part 1 - Currently upto IBM MF 6.3 - there is no formal support in the product UI but we have been qualifying Visual Studio 2013 in the meanwhile (https://www.ibm.com/developerworks/community/blogs/worklightsmobileplayground/entry/ibm_worklight_and_microsoft_visual_studio_2013?lang=en)
Part 2 - our current WindowsPhone8 environment is Silverlight based. What you can try doing is Create a native app with Windows8 environment (this will create a C# app). Open it in VS2013 and then add a Windows Phone 8.1 project to it. Then add the DLL references to the phone project and copy the assets to the Phone Project (or Shared Project) and try running on the Win 8.1 phone. This should work (I have tried Hybrid and it works, but not native - hence not saying conclusively)

Win Phone System.Windows.Controls.Control not found

I'm developing a universal windows 8.1 app, though I'm primarily working on the windows phone version.
System.Controls.control should work for windows phone, but whenever I add System.Windows.Controls.dll to my Win Phone 8.1 references, my project won't compile and it says:
Cannot find type System.Windows.Controls.Control in module System.Windows.dll
This happens whether or not i actually say "using system.win.." etc, it happens as soon as I add it to my project references. This dll is from my programfiles(x86)/microsoftsdks/silverlight directory.
Any ideas on how to fix this issue?
You're trying to use Silverlight controls in a WinRT app. That won't work. New UI controls are a part of Windows.UI.Xaml.Controls.
Find the list of controls which are in that namespace here. Also, please read more about the two different XAML models available in Windows Phone 8.1.

nuget failed to add references into Windows phone 8.1 project in universal apps

I have a strange problem, I am migrating a Windows Phone 8 app to Windows Phone 8.1 universal app. In that I am using Facebook and Facebook.Client packages. In Windows Phone 8.1 universal app project nuget package manager failed to add Facebook packages into the project by saying the error like Couldn't find any packages that support Windows phone 8.1, after this error I added the Facebook and Facebook.Client references manually from my old Windows Phone 8 project, when I build the project compiler throwing error:
Error 1 Cannot find type System.Windows.Controls.Control in module System.Windows.dll
Actually I added Windows Phone 8 Facebook.Client.dll. So compiler throws this error. After this I have added Windows 8 Facebook.Client.dll, the build succeeded. But when I call facebook Loginasync() method, I am getting NotImplementedException.
Any one help me how to resolve this exception. I guess Facebook packages are not updated to support Windows Phone 8.1 universal app. If so can any one help me how to integrate the Facebook in Windows Phone 8.1 universal app (Windows 8.1 its working fine).
The Facebook package has been migrated to the Universal app stack, however the Facebook.Client package has not. The Facebook.Client version for Windows Phone 8 targets the Silverlight version of the APIs, so it won't auto-magically convert to supporting Windows Phone 8.1 Universal projects. Someone is going to need to port it.
The source can be found here:
https://github.com/facebook-csharp-sdk/facebook-winclient-sdk
For Windows Phone 8.1 there is a new step in the login process you need to do.
In OnActivated of app.xaml.cs add the following code:
if (args.Kind == ActivationKind.WebAuthenticationBrokerContinuation)
{
App.MobileService.LoginComplete(args as WebAuthenticationBrokerContinuationEventArgs);
}

Categories