can not add System.Data.Linq reference in windows phone 8.1 - c#

I am unable to add System.Data.Linq reference from the add reference in the System.Data.Linq Visual Studio 2013 update 2. This reference is not shown, it says that all the available references have been added.
But when I import System.Data.Linq and System.Data.Linq.Mapping, it shows if I am missing a reference or an assembly.

Unfortunately the entire System.Data namespace is unavailable to the new non-Silverlight Windows Phone Apps.
This is because SQL CE has not been made available to the Windows Runtime. So we have to find our own database implementation to store structured data locally on the phone.
SQLite is highly recommended as an alternative. It should be possible to use it like SQL CE, including using LINQ syntax.
Alternatively, you can make a "Windows Phone Silverlight 8.1 app". The Silverlight runtime is still available for Windows Phone 8.1 and SQL CE is still available from Silverlight. We just can't be 100% sure if Silverlight will be supported on Windows Phone 8.2/8.3/9.0/...

Related

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

Developing Window Store Apps in Visual Studio 2013 on Window 7 64-bit without emulator

This is going to be quite a long question but please bear with me till the end. Before going into the details, below are my PC environments:
Windows 7 Professional x64
Visual Studio Community 2013 Update 4
On top of that, I checked my PC's processor does support virtualization using IntelĀ® Processor Identification Utility.
I also installed all the required SKD 8.1 components required to develop Windows phone 8.1 apps as shown in the picture below.
Now I clearly understands from the visual studio website requirements:-
Windows Phone 8.0 development requires Windows 8.1 (x64) or higher
Windows Phone 8.1 development requires Windows 8.1 (x86) or higher
For the Windows Phone emulators, Windows 8.1 (x64) Professional
edition or higher, and a processor that supports Client Hyper-V and
Second Level Address Translation (SLAT)
But from this SO Q&A it seems like developing windows 8.1 phone apps is still possible. However when I try to open an existing windows phone 8.1 project I got the error as shown in the picture below:
On top of that, in my Add New Project window there are no Windows Store Apps templates showing up.
I later found out from this msdn documentation that the RequiredPlatformVersion Element of the Visual Studio project template is filtering out the templates. However I tried to change the Blank Windows Phone project template element's value to 8 as specified in the documentation and also a few others value smaller than 6.3.0 but still fail to show the template.
Then I tried to install an extension called Windows Phone Template Pack which then adds two window phone project templates in my Add New Project window as shown below.
I created an empty project using that template and surprisingly I am able to open the windows phone 8.1 project as shown in the picture below.
That got me thinking that it should be possible to develop windows phone 8.1 apps but not emulating it but I am out of ideas on how to work around it now. I even tried looking at the denv.exe.config file to try my luck but there's nothing of interest there either.
Is there anyone that successfully build a Windows Phone 8.1 apps in an similar PC environment? A workaround will be sufficient.
Sorry to say this but Windows 8.1 is a requirement for developing as usually emulators on being initialized tries to load the OS into the device like the basic theme etc options.
1) You can try to connect your Windows phone to your PC and select Deploy to Device. (Though it might work and you will be able to debug yet still you would face a problem when you try to create a release build package to be uploaded on windows store. Also even though the fixes might work for short period but with Windows 10 about to be released you would be stuck with waiting for a fix to develop apps for that.)
2) You can try installing windows 8.1 inside VMWARE and deploy it.

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

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

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.

How to programmatically detect if Windows 8.1 Update is installed

I'd like to detect from a C# application whether the latest Windows 8.1 Update (KB 2919355) is installed
I haven't been able to find anything on any of microsoft's sites or via google that indicates how one might do this.
Thanks!
That update is actually a "rollup" or a collection of other separate smaller updates. If you go to the Knowledge base page for the update and scroll down to the "File information" you can see the update is actually the combination of the following other updates.
KB2919442
KB2919355
KB2932046
KB2937592
KB2938439
KB2934018
You will then need to either check that all of the above listed updates are applied or the single master update is applied. I am not sure how to do that in C# alone but via the commandline you can just do it by the console command
wmic qfe get hotfixid | find "KB2919355"
I installed Windows 8.1 Update from an MSDN download before it went live on Windows Update. It was distributed as a series of MSU files with a ReadMe. The list of updates in the ReadMe may be useful, if you choose to detect their presence.
Windows 8.1, Windows Server 2012 R2, Windows RT 8.1 Update
Recommended Install Order
1. KB2919442
2. KB2919355
3. KB2932046
4. KB2937592
5. KB2938439
6. KB2949621
This may be the culprit:
Operating system version changes in Windows 8.1 and Windows Server 2012 R2
Manifestation
In Windows 8.1, the GetVersion(Ex) APIs have been deprecated. That means that while you can still call the APIs, if your app does not specifically target Windows 8.1, you will get Windows 8 versioning (6.2.0.0).
Solution
In order to target Windows 8.1, you need to either include the app manifest or include _NT_TARGET_VERSION=$ (_NT_TARGET_VERSION_LATEST) in the source file.
Mode details of the required manifest contents are given in the article.

Categories