Visual Studio Xamarin missing multiplatform library template for NuGet - visual-studio

My goal is to create a multi-platform Xamarin library that is to be used by Xamarin.Forms application for iOS and Android. About 10% of the library code is going to be platform-specific (bluetooth communication). The library is plain C#, it won't use any Xamarin.Forms or platform-specific graphics. In the end I would like to add the library as a NuGet package.
I planned to implement the library using the multiplatform library template for NuGet. The problem is that I don't see the template at all (look at the pictures below). I'm using Visual Studio for Mac 2022 (version 17.4.2).
Templates I should see (according to docs):
Templates I actually see:
Visual Studio Installation:
Questions:
Is the "Multiplatform library" still supported in Visual Studio for Mac? (as of 31.12.2022)
If it is supported, what am I missing?
If it is no longer supported then how would I create the library I described? I'm a bit new to the Xamarin ecosystem.

Related

Xamarin SDK in Visual Studio

Visual Studio can have multiple Extension SDKs which are used to ease the development.
Is Xamarin SDK belongs to one of those Extension SDKs of Visual Studio
IDE?
Xamarin SDK is an open-source framework to develop mobile application. And it is bundled as a free tool within Microsoft Visual Studio's integrated development environment.
To answer your question, Yes Xamarin SDK is a part of SDKs in Visual Studio.
Visual Studio use the NuGet Package Manager to Install and manage packages(Like the Xamarin SDK and other Extension SDKs you mentioned in your question).
Those packages are added to your project and you can use them to develop your project.
Xamarin is installed by default if you create a Xamarin.forms project in Visual-Studio.
Xamarin is shipped as a Visual Studio Workload. Although this documentation page doesn't show the individual SDK packages, they are included in the component: Component.Xamarin.
i.e. Xamarin.Android.Sdk / Xamarin.VisualStudio.Apple.Sdk / etc
If you installed Visual Studio 2019 and watched the installer, you'd see the names of these packages as they progress!
Otherwise you can just go into Visual Studio and click on Help -> About Visual Studio and see all of the various packages!

Not appear Xamarin forms PCL projects in visual studio 2017 enterprise version 15.5.2

I upgrade visual studio 2017 to version 15.5.2, when I create a new project of xamarin forms not show PCL (Portable Class Libraries) project that appear .net standard and Shared Projects.
I need to create some project PCL of xamarin forms, help me.
Since a recent version the templates replace the PCL library with a .NET Standard library. And I suggest that you stick with it, as it will be the future.
You should be able to create a PCL library if you really want to and make it work. Also, as a workaround, you could create the project on Visual Studio for Mac. It doesn't have the updated templates (yet) and you will still be able to create the app with a PCL. Just copy that or commit it to source control and open it on Windows afterwards.

Xamarin - Include Windows in Platform-Specific Library NuGet Projects

Visual Studio for Mac (formerly called Xamarin Studio) has a cool feature where you can easily create NuGet platform-specific multiplatform library projects.
However, VSMac doesn't know how to include Windows as one of the target platforms (only iOS and Android). I thought I would try creating a NuGet library project in VSMac (targeting only iOS and Android) and then have Visual Studio 2017 Windows add the Windows version, but VS2017Win can't even load the solution that VSMac creates ("This version of Visual Studio is unable to open the following projects.").
Do I just have to sit tight and wait for Microsoft to add this functionality to VS2017Win?
Do I just have to sit tight and wait for Microsoft to add this functionality to VS2017Win?
If I understand your question correctly, you want to create a cross-platform package that uses native APIs on iOS, Android, and Windows. This functionality has been supported on Visual Studio 2017 on windows. You can refer to the detail info from the document:Create cross-platform packages
Besides, since Visual Studio for Mac is still a preview version, many features need to be improved and added. If want to use Visual Studio for Mac to create the cross-platform package and include Windows as one of the target platforms, the current method seems to be only wait for Microsoft to add this functionality to VS2017 for Mac.
Hope this can help you.

Xamarin Studio: Satellite assembly not copied with Xamarin Studio on macOS

We have build a Xamarin.Froms library with some common XAML pages and common translations (satellite assembly from resx files). This library is packed as nuget package.
If we use the assembly in one of our apps we have localization problems if we build with Xamarin Studio on macOS.
If we build with Visual Studio 2015, the satellite assemblies of the library are copied to the output und compled in to the apps.
If we build the same solution with Xamarin Studio on macOS, satellite assemblies of the library are NOT copied to the output and also not compiled into the apps.
What is going wrong with Xamarin Studio?
Is there any build in solution for this bug (except copy all satellite assemblies in a post build action)?

Xamarin Forms App with F# in Visual Studio

Is there a template for one of these in Visual Studio? I can't find one installed or online.
There is not. There is one for Xamarin Studio, but it will not work in Visual Studio.
You can create a C# "Xamarin.Forms Portable" solution, which will create the platform-specific applications in C#, and then replace the shared C# PCL with an F# PCL to do the cross-platform development. You just need toInstall-Package Xamarin.Forms to the F# PCL and it should work. (You can also create and reference F# PCLs for the platform-specific code if you so desire.)

Resources