Unable to add assembly reference for windows phone app - c#

I am trying to create a background task in Windows phone application. However I am unable to add reference to Windows.ApplicationModel.Background dll. Where is it located and how to add?

It is not a part of the Windows Phone platform, it is part of the Windows Store platform.
MSDN - Windows.ApplicationModel.Background namespace

Related

Missing assembly Microsoft.Phone.dll

When I am building a Windows Phone 8.1 project, I get this error:
I have searched on the internet but can't find the solution. They say the Microsoft.Phone.dll should be located in C:\Windows\System32 but it isn't there!
I have also tried to make new blank Windows Phone Project 8.1 and tried to build that immediately and I get the same error.
Thanks in advance!
You can't add Silverlight assembly to Windows Phone 8.1 App Project. You should to distinguish between 8.1 Silverlight and 8.1 WinRT Windows Phone projects.
EDIT
If you want to use Microsoft.Phone.dll in your 8.1 project, you must to create Windows Phone Silverlight 8.1 App
Create an application
Choose OS Version
After that you can user Microsoft.Phone.dll
But I recommend to create an usual Windows Phone 8.1 Application and use new SDK.

Windows.Devices.Custom.IOControlCode in Windows 10 Universal

Can I use Windows.Devices.Custom.IOControlCode in Windows 10 Universal Apps? I am trying to use a custom driver, and this is what Microsoft said to use for Windows 8.1 apps. Anyone know a work around?
When I try to use Windows.Devices.Custom.IOControlCode in my Windows 10 Universal App I get the error:
Error CS1069 The type name 'IOControlCode' could not be found in the
namespace 'Windows.Devices.Custom'. This type has been forwarded to
assembly 'Windows, Version=255.255.255.255, Culture=neutral,
PublicKeyToken=null, ContentType=WindowsRuntime' Consider adding a
reference to that assembly
I don't understand what assembly it is saying to add? Windows Runtime? Where is that located?
Add a Reference -> Universal Windows-> Extensions-> Microsoft Desktop Extension SDK for Universal App Platform.

How do I include a timer in a universal windows app with c#

I need a timer in my universal windows app. I have read that the only one available for universal windows apps is System.Windows.Threading.DispatcherTimer. In order to use this I manually added the WindowsBase.dll to my app's references in the solution explorer in visual studio. Now I get the following error:
Error 3 Cannot find type System.ComponentModel.TypeConverter in module System.dll. Game.Windows
The error goes away if I delete the WindowsBase reference. What am I doing wrong?
The assemblies you can add to a Universal app are listed in the Project + Add Reference, Assemblies, Framework list.
Yes, it is empty.
That was intentional.
Because you already have a reference to all possible .NET assemblies in a Universal app project. Using the Browse button is not a workaround. And causes the kind of misery you describe, WindowsBase has types that can only work in a WPF app. The kind that runs with the full .NET Framework you've got installed on a desktop. Not the kind that a user has on his phone, called .NETCore. It is small, phones are small.
You already have the Windows.UI.Xaml.DispatcherTimer available in a Universal app project, no need to add a reference.
I think the one that windows store apps use is located in Windows.UI.Xaml namespace
I have been using ThreadPoolTimer, in Windows.System.Threading.

SpellCheck for Windows Phone

I'm using NetSpell.SpellChecker in my WindowsPhone 8.1 application, but when I compile the code I'm getting the following error:
The base3 class or interface 'System.CompoenentModer.Compoenent' in
assembly xxx referenced by type NetSpell.SpellChecker.Spelling could
not be resolved.
Does anyone have an idea how to solve it? Is NetSpell supported in Windows Phone apps?
If not, do you have any idea of how to implement spellcheck/auto correct in Windows Phone?
If you are using Windows Runtime to build apps for Windows Phone, the support is built in, use:
<TextBox IsSpellCheckEnabled="True" />
Unfortunatly this doesn't work in Windows Phone Silverlight applications.
And the NetSpell library doesn't seem to be compatible with Windows Phone, it is dependent on System.ComponentModel.Component, which according to the MSDN documentation is not supported on Windows Phone. I have yet to find another spell checker library. (NHunSpell also doesn't seem to work with Windows Phone)
If it is for your app, I would recommend writing the app as a Windows Phone Store app (Windows Runtime) and use the built in support instead.

Using .NET library in Windows Phone 8.1 application

I want to create Windows Phone 8.1 application in C#. I have a commercial .NET library I need to use which, according to the documentation, is compatible with Windows and Windows Mobile operating systems. When I add a reference to this library in my project and compile, I receive the following error: Cannot find type System.Collections.CollectionBase in module mscorlib.dll.
Is there any way to use this library in Windows Phone 8.1 application?

Categories

Resources