Is there a simple way to install the Xamarin PCL profiles in Visual Studio? - visual-studio

My company is developing corporate Windows 8.1 apps for use within the organisation. Although we are only targeting Windows 8.1, we are interested in developing our apps with a view to eventually target Android and/or iOS by using Xamarin.
So, we want to develop using PCLs that are compatible with Xamarin, but we haven't licenced it yet, since we're not ready. Can we simply install the PCL profiles for Xamarin so we can at least be assured that our classes will be compatible, if and when we are ready?

So you have couple of possibilities.
As m-y mentions in his comment you can install the trial and you will get the PCL profiles.
You can get someone else with the Xamarin tools installed to grab a copy of the PCL profiles on his machine (a bit harder to maintain).
You can buy the product (might not be what you want)
However, you could go ahead, make the PCL you are currently using and target it to WPA8.1 and Windows 8.1, and later on just change the profile and make the minor corrections it would take to get it working with Xamarin.

The profiles are not xamarin profiles - they are .net profiles which xamarin support.
The profiles are installed as part of visual studio 2013 - or can be installed as extensions to visual studio 2012.
If you select WindowsPhone Silverlight 8.0, .net 4.5 and Windows Store apps then this will allow you to build a profile 78 pcl library - which is one of the profiles xamarin support - and is a pretty good choice for modern development...

Related

Xamarin SDK was not found for JetBrains Rider

I am hoping to work with Xamarin for a project, primarily to learn a little about cross-platform app development, and would prefer to stick to developing on Linux. This led me to attempt to work with the JetBrains Rider IDE, something that I believed to be fairly well documented, as per these resources:
Xamarin.Android on Linux (in coordination with its Ubuntu 19.04 update post)
Failed to load Xamarin Forms project with .NET Standard 2.0 Lib in Rider
0xFireball's Xamarin.Android on Linux guide with associated Rider/IDE setup
I've been able to install everything just fine, Android Studio and Rider were installed via JetBrains Toolbox (I also tried installing Rider manually, but it made no change), and I am able to create the project and configure the Android settings for the Xamarin project.
This is where my luck ends, since despite trying the various resources I've linked above, including reinstalling mono and dotnet-sdk multiple times, I get this error no matter what I try:
Xamarin SDK was not found: Rider was unable to find Xamarin SDK on
this machine. Xamarin-based projects will not be loaded. Please
install Xamarin SDK or change toolset.
I've tried following the instructions both on a manually installed Rider 2019.1.3 (Build #RD-191.7141.460) and Rider 2019.2 EAP (Build #RD-192.5895.291).
I'm fairly new to the world of Xamarin, so I'm not sure where to begin looking. What exactly is the Xamarin SDK (is it just Xamarin.Android?), and what should I be checking my setup for in order for Rider to detect the Xamarin SDK?
It appears that what Rider installs via its Environment page, is only the Xamarin Android package. Not the actually Android Studio SDK, which is needed to develop any android apps. You have to download that separately.

Android Studio for Project Tango

I have downloaded latest Android Studio 2.2.3 and I want to start with C examples for project Tango phone (Lenovo Phab 2 Pro) using C API. The phone itself says it's run Android 6.0.1, kernel 3.10.84 on device.
Google developer documentation for Tango Project suggest to install Android Studio with Android SDK 24.4.1, Platform tools 23.1 and NDK 11.0.0.
By installing latest Android Studio there is no offering to install those versions of tools. Is it possible to use whatever SDK for development (latest)?
Where do I find aforementioned versions?
What Android SDK & NDK version is required for phone which run Android 6.0.1?
I started using the Dev Kit which runs Android 4.4 KitKat and I just recently got the Phab 2 Pro this week and I didn't need to make any updates to my Android Studio SDK manager.
Since I am working only with the Tango and not with the underlying Android features, I have found no need to require 6.0 for I am not using any of the extra features.
Also go here and clone the repo and run the hello-world and see if you can get it to work on your phone, if so you are good to go!
the SDK Manager which is part of Android Studio offers you choices on levels of android builds like 4.4.2/5.1/6.0/6.1, etc. Platform tools package is a module within the SDK Manager which also has levels which are based on the android build. The NDK is a completely different package and depending on what you want to accomplish you might be able to not worry about it to start of with. install Android Studio and then setup the SDK Manager to cover what devices you want to build for. get the latest Platform tools package setup and you will be ready to code. once you start setting up your environment things will fall in place. for the most part the installer does the work. pay attention to the things needed prior to installing Android Studio. i think you need to install a jdk and set paths and variables.

Creating MvvmCross PCL to target Wp7.1 Xamarin.iOS, Xamarin.Android, .Net 4.5 and SL4 and higher

After researching MVVMCross project, I am very keen to use it in a new mobile project and began setting out my project today. All was going fine until I tried to target the exact frameworks Stuart does in the "N=0 : A first MvvmCross Application" youtube video. I've no idea why this collection isn't allowed and I'm not as knowledgeable on PCLs and "profiles" as I could be.
Environment:
I'm using VS2012, although VS2013 is installed also. WP7.1 is installed as is SL5 and Xamarin.iOS and Xamarin.Android. I've tried to repair both Xamarin installations because I thought the issue might have been that I installed WP7.1 after the Xamarin pair.
Also worth noting is that if I uncheck Windows Phone 7.5 and higher then it still won't work. I have to also set Silverlight 5 for the dialog to let me proceed. I'm not sure what more I can do do get this working so I'd appreciate any help I can get. All I want is to basically target the exact frameworks as are in that video mentioned above.
There are no Monotouch or Monodroid projects right now in Xamarin, so that link will not realy help you. They are called now Xamarin.iOS and Xamarin.Android. So what I've done that helped me, I've extended Profile 7, so it now supports WP7, iOS, Android and WinStore and it works great, no problems yet and I've already complete a couple of projects with it. So at that link - PCL Setup - you can find where all the profiles located and with that info try to extend Profile 7 as I suggested. So I've coppied the Windows Phone 7.xml from C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.0\Profile\Profile131\SupportedFrameworks to C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile7\SupportedFrameworks
The video and PCL setup link are out of date now that Xamarin has released official support for PCLs. I'd recommend targeting the following platforms:
Windows Phone 8
Windows Store apps (Windows 8)
.NET Framework 4.5
Xamarin.iOS
Xamarin.Android
And, optionally you can target Silverlight 5.

How to make my WP8 app compatible for WP7.8

I am asking here because I'm a little bit confused. I have a working WP8 apps, with WP8 specific features such as speech recognition and custom tiles. I would like to make my app compatible for WP7.x
I know I have to remove speech recognition from my app to support WP7
1 - Where should I start ? Could I use the same project on Visual Studio 2013 or should I create another project on Visual Studio 2012 ?
2- Is it simpler to target only WP7.8 or can I do WP7.5 and WP7.8 in a same project ?
3 - I want to keep the use of async/await method, can I do that in WP7.8 or WP7.5?
Thanks a lot for your answer
You have to create a new project targeting 7.1. WP7.x apps can run in WP8 devices, but not in the other way.
When createing the project, you target 7.1. If you have the latest SDK installed WP7.8 features will be available.
You can by adding Microsoft.Bcl.Async package from NuGet
"Could I use the same project on Visual Studio 2013 or should I create another project on Visual Studio 2012 ?"
You cannot target WP7 in VS 2013. You must use VS 2012 or 2010.
"Is it simpler to target only WP7.8 or can I do WP7.5 and WP7.8 in a same project ?"
You can target both in the same project. The main difference is just different tile sizes in 7.8 and if you want to support this you can use reflection to check. Otherwise there is no difference.
"I want to keep the use of async/await method, can I do that in WP7.8 or WP7.5? "
There are Nuget packages which support this.

Xamarin IDE and visualstudio for windows +Mvvmcross

I have some confusions About the IDE to use for MvvmCross
a) VisualStudio (VS) uses Xamrarin.iOS and Xamarin.Android plugin for iOS and Android development. But can we also use PCL(Portable Class libraries) and MVVMCross/Monocross frameworks in VS? I see the PCL option on VS but, i don't see the support for Android & iOS. Do i need to install additional plugin for PCL to support these two platforms as well?
b) Xamarin IDE supports Android and iOS development on Mac but, is it true that Xamarin doesn't support Mono.iOS on windows? Isn't it strange that Visual studio can use the network mac for iOS development but why not Xamarin Studio?
Thank You for your time.
Regards,
Saurav
a) VisualStudio (VS) uses Xamrarin.iOS and Xamarin.Android plugin for iOS and Android development. But can we also use PCL(Portable Class libraries) and MVVMCross/Monocross frameworks in VS? I see the PCL option on VS but, i don't see the support for Android & iOS. Do i need to install additional plugin for PCL to support these two platforms as well?
MvvmCross currently uses Profile104 for Portable Class Library development. You can easily develop for this profile without installing Android and iOS. The mapping of PCL profile to platforms is, however, quite confusing (it's not exactly obvious) so the easiest way I find to create a Profile104 PCL is:
to create any PCL
then to manually edit the csproj file to say Profile104 - look for a line like: https://github.com/slodge/MvvmCross-Tutorials/blob/master/Babel/Babel.Core/Babel.Core.csproj#L14 in the csproj
I have customers who develop in medium size teams where only some people have the Xamarin tools installed - most people have just Windows tools and work on the PCLs using Unit Tests and using WindowsPhone/Store user interfaces.
b) Xamarin IDE supports Android and iOS development on Mac but, is it true that Xamarin doesn't support Mono.iOS on windows?
Yes, this is true.
Isn't it strange that Visual studio can use the network mac for iOS development but why not Xamarin Studio?
This may feel strange, but I believe this is actually this is Xamarin listening to their customers.
I believe, that the reason customers wanted Windows support for iOS was because they wanted to use Visual Studio and they wanted to use plugins like Resharper. Xamarin provided this in their 2.0 release.
It is true that they could also have added iOS functionality to XamarinStudio for Windows as well - but this (I believe) wasn't what any of their customers were asking for - so adding it would have created more work (both in creating and maintaining it) without adding any significant benefit (IMO)

Resources