dotnet / dotnet/docs-maui

Adding platform-specific code to a multi-platform library

Open
#917 0 comments 1 reaction 0 assignees View on GitHub
doc-idea Pri2
Dominant language
No language data
Stars
282
Forks
265
Avg merge
2d 2h
Merged PRs (30d)
19

Description

Add a doc on creating a multi-platform library that contains platform-specific code, in both VS and VSMac.

This was doc'd for VSMac 2019 at https://learn.microsoft.com/en-us/xamarin/cross-platform/app-fundamentals/nuget-multiplatform-libraries/single-codebase#adding-platform-specific-code but is no longer valid for VSMac 2022.

There are now two options:

1. SDK style projects and targeting .NET 6: use a standard class library with multiple TFMs.
2. Older platforms: use the MSBuild.Sdk.Extras style project - https://github.com/jamesmontemagno/plugin-template

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.