Visual Studio 2013 windows phone project templates doubts - c#

I have updated my code to WP 8.1 and wanted to organise it better by using Class Libraries.
The doubt comes when I find there are 2 Class library project templates for Windows Phone:
Class Library (Windows Phone)
Class Library (Windows Phone
Silverlight)
If i select template 1, i see the assemblies referenced by default are .NET for Windows Store Apps and Windows Phone 8.1
If i select template 2, i got asked the target version of the Windows Phone OS (8.0 or 8.1) and the assemblies references by default are .NET for Windows Phone and Windows Phone.
Do you know the differences between them?
I have looked into the matter and seems it depends if you want to load the .NET runtime namespaces or not, am i correct? Are there any more differences?

The class library type will depend on whether your main app will be a Windows Phone 8.1 Silverlight app, or Windows Phone 8.1 XAML app.
The advantage of WP8.1 XAML app is that it is converged with Windows 8.1 - you can even create an Universal App that shares almost all code and xaml between the Win8 and WP8.1 apps.
The advantage of WP8.1 Silverlight app is that it is more closer to the old WP8.0 app - less changes are required, and also it has access to some APIs not available to WP8.1 XAML apps.

Related

TeeChart for Xamarin.Forms with Windows 8 (WinRT) apps

We have a Xamarin.Forms app that also supports Windows 8/8.1 as a platform. Xamarin.Forms has support for WinRT and that's how it can be deployed to Windows 8/8.1.
We are using TeeCharts for Xamarin.Forms however, it doesn't seem to support WinRT as a platform. Is there a way to use TeeCharts for Xamarin.Forms with Windows 8/8.1?
I'm afraid TeeChart for Xamarin.Forms doesn't support WinRT (Windows 8/8.1).
However, TeeChart.Store.dll should be able to target this environment without problems. Please, contact "info at steema dot com" - referencing this post - for further instructions about how to get it.

Can I create Windows Phone 8.0 class library project and use that in Windows phone 8.1 project

In my windows phone 8.1 project I am using MediaCapture Api for capturing photo's, but I experienced issue on the devices that comes with 8.0 and later upgarded to 8.1,
The problem is that on such devices camera capture fails after taking 10-15 images and it's just saves green screen instead of original image.
So what I thought is to create 8.0 class library and use CameraCaptureTask of 8.0.
Will that work? If so than Is it recommended way to do so?
Guessing that your 8.1 project is 8.1 XAML not 8.1 Silverlight the answer is no. The camera API really sucks in 8.1 XAML, if it is a core functionality of your app, just go with 8.1 Silverlight.

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.

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)

Silverlight project in Windows universal app (Runtime)

I am creating universal app, but I want to use parts of older app, wroten in Silverlight 8.1. Is there option how to make cooperate these four projects:
MyProject.Windows (Windows 8.1)
MyProject.WindowsPhone 8.1 (Windows Phone 8.1)
MyProject.Shared
MyProject.OldSilverlightCodes(Windows Phone Silverlight 8.1)
I want to avoid migrating Silverlight code to Runtime line-by-line, it is just too complex to my skills. Is possible connect them any way, maybe via some converter class?
No, you cannot include a Silverlight project in a Windows Runtime project, and there aren't any automated converters.
In general, the best way to share .Net code across multiple targets is to use a Portable Class Library. Depending on what code you have in the Silverlight project it may be straightforward to extract the shared code to a PCL and then use the same PCL in both projects.
--Rob

Categories