why can't I choose PCL project in options when I create a Cross-Platform App (Xamarin.Forms) ? there is just a Shared Project and .NET Standard, when I previously create a project there was a PCL option.
https://i.imgur.com/KDwty6a.png
When I try to create a PCL in VS 2017 it says "Class Library (Legacy Portable)
and "This project type has been deprecated. You should use Class library (.NET Standard) instead."
But if you still want it, xamarin has a guide, you can read about creating a PCL project here.
Related
Can a .NET Core console app make use of classes in UWP assemblies?
I am only interested in those that do not involve visual elements.
No, a .NET Core app cannot directly reference an assembly that targets the Universal Windows Platform (UWP, uap10.0) if that's what you are asking.
So if you for example have a class library that was created using the Class Library (Universal Windows) template in Visual Studio, this project is not compatible with any other platform than UWP and cannot be referenced from a .NET Core app/project.
If you need to share code between UWP and other platforms, such as .NET Core, your class library should target .NET Standard instead of UWP.
I try to create a new project(xamarin form) in vs2019, and discovered that the UWP template is missing.
I created the project in vs2017 yet it did not work. now I have added a UWP project to the xamarin form app created using vs2019, how do I link them, how do I connect(refrence) the UWP to the portable library?
I want to make use of the portable library in xamarin forms that ha UWP in it, like vs2017 versions
In VS 2019 version 16.0.0 UWP head project have been removed from the Xamarin.Forms app template. However, if you install latest version of VS 2019 (16.0.1) that option should be available to you. According to the release notes:
Add option for Windows (UWP) platform when creating new Xamarin.Forms project from 'Mobile App (Xamarin.Forms)' project template.
Other then that you could just simply add UWP as a separate project and set it up for Xamarin.Forms.
I am developing a mobile application with Xamarin.Forms / Prism.
I used PCL Profile 44 until now.
That is because PCL Profile 44 contains the function of WCF.
Today, I created a project using Prism Template Pack 2.0.
A project was created with .NET Standard instead of .NET Framework.
When .NET Framework and PCL Profile 44, there was an item "Add Service Reference" in the PCL project, in Visual Studio.
However, when it comes to .NET Standard, that item does not exist anywhere.
How do I run "Add Service Reference"?
The following site is introduced to the method of WCF access with Xamarin.
https://developer.xamarin.com/guides/cross-platform/application_fundamentals/web_services/walkthrough_working_with_WCF/
But I do not want to use this method.
In this way, you will create a WCF access process in your Android / iOS project. And here we are using SLsvcUtil.exe.
When PCL Profile 44 is used, you can write WCF access processing in PCL project. Also, SLsvacUtil.exe is unnecessary.
I tried the following plug-in, but an error occurred when adding service reference.
https://marketplace.visualstudio.com/items?itemName=WCFCORETEAM.VisualStudioWCFConnectedService
I have .Net 4.5.1 (I am not trying to target .NetStandard) and Xamarin.Forms 2.3.4.247 and latest VS2017 15.2 (26430.15). I create a new project using Cross-Platform > Class Library (Xamarin.Forms) and do not get the 2 projects for (.Droid and .iOS). Been all over Google but come up empty handed.
I am trying to follow one of the many 'getting started with Xamarin' videos/course and cannot get to first base. OK so they are using VS2015 but I have not read anywhere that VS2017 is a problem.
What do I need to look for?
When you create a new Class Library project, you will only get a PCL project. If you want to create a solution with PCL, iOS UI and Android UI project, create using Cross-Platform > Cross Platform App (Xamarin) template. Then from there you can see dialog to select Native or Xamarin.Forms template.
Can I have a .NET Class Library project with Entity Framework 6.1.1 (in windowsazure.mobileservices.backend.entity nuget package) work with Xamarin.Forms PCL app? Is this achievable? If not what are the possible complications?
Question Background:
I am working on a Xamarin.Forms cross platform PCL app with Azure Mobile Services back-end, targeting Android, iOS, Windows 8.1 and WinPhone 8.1. I actually dont care about Windows 8.1 but Visual Studio does not allow me to remove this target. So it stays.
Azure Mobile Services is setup, but I need the tables to be generated automatically (strongly avoiding manually typing table definitions in azure portal). I decided to go EF code first way with windowsazure.mobileservices.backend.entity nuget package to achieve this. However, the Xamarin.Forms PCL project does not support additional assemblies.
I am thinking of adding this package into a separate class library project and referring to it from the PCL project.
Thanks for your help!
The EntityData type is the required superclass of DTOs on the server SDK. Unfortunately, it has dependencies that are not supported in a PCL project, so it has to be used with a full .NET 4.5 project.
You could instead use partial classes to share DTOs between client and server. Just put all of the non system property types in a common code file that's shared between client and server. Then, on the client, add the system property implementation (ID field, UpdatedAt optionally, Version optionally). On the server, add another partial class definition that inherits from EntityData.