Skip to content

Commit

Permalink
Xamarin reference updates (#34460)
Browse files Browse the repository at this point in the history
* Xamarin reference updates
  • Loading branch information
wadepickett authored Jan 13, 2025
1 parent 8a730be commit 6474dea
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 24 deletions.
2 changes: 1 addition & 1 deletion aspnetcore/fundamentals/target-aspnetcore.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ Alternatively, .NET Standard 2.0 could be targeted instead of targeting both .NE

With the preceding project file, the following caveats exist:

* Since the library only contains Tag Helpers, it's more straightforward to target the specific platforms on which ASP.NET Core runs: .NET Core and .NET Framework. Tag Helpers can't be used by other .NET Standard 2.0-compliant target frameworks such as Unity, UWP, and Xamarin.
* Since the library only contains Tag Helpers, it's more straightforward to target the specific platforms on which ASP.NET Core runs: .NET Core and .NET Framework. Tag Helpers can't be used by other .NET Standard 2.0-compliant target frameworks such as Unity and UWP.
* Using .NET Standard 2.0 from .NET Framework has some issues that were addressed in .NET Framework 4.7.2. You can improve the experience for consumers using .NET Framework 4.6.1 through 4.7.1 by targeting .NET Framework 4.6.1.

If your library needs to call platform-specific APIs, target specific .NET implementations instead of .NET Standard. For more information, see [Multi-targeting](/dotnet/standard/library-guidance/cross-platform-targeting#multi-targeting).
Expand Down
5 changes: 1 addition & 4 deletions aspnetcore/grpc/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ author: jamesnk
description: Learn how to call gRPC services with the .NET gRPC client.
monikerRange: '>= aspnetcore-3.0'
ms.author: wpickett
ms.date: 6/5/2024
ms.date: 01/08/2025
uid: grpc/client
---
# Call gRPC services with the .NET client
Expand Down Expand Up @@ -62,9 +62,6 @@ Channel and client performance and usage:

`GrpcChannel.ForAddress` isn't the only option for creating a gRPC client. If calling gRPC services from an ASP.NET Core app, consider [gRPC client factory integration](xref:grpc/clientfactory). gRPC integration with `HttpClientFactory` offers a centralized alternative to creating gRPC clients.

> [!NOTE]
> Calling gRPC over HTTP/2 with `Grpc.Net.Client` is currently not supported on Xamarin. We are working to improve HTTP/2 support in a future Xamarin release. [Grpc.Core](https://www.nuget.org/packages/Grpc.Core) and [gRPC-Web](xref:grpc/browser) are viable alternatives that work today.
## Make gRPC calls

A gRPC call is initiated by calling a method on the client. The gRPC client will handle message serialization and addressing the gRPC call to the correct service.
Expand Down
10 changes: 4 additions & 6 deletions aspnetcore/grpc/netstandard.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ author: jamesnk
description: Learn how to use the .NET gRPC client in apps and libraries that support .NET Standard 2.0.
monikerRange: '>= aspnetcore-3.0'
ms.author: wpickett
ms.date: 3/11/2021
ms.date: 01/08/2025
uid: grpc/netstandard
---
# Use gRPC client with .NET Standard 2.0
Expand All @@ -22,8 +22,6 @@ The following .NET implementations (or later) support [Grpc.Net.Client](https://
* .NET Core 2.1
* .NET Framework 4.6.1
* Mono 5.4
* Xamarin.iOS 10.14
* Xamarin.Android 8.0
* Universal Windows Platform 10.0.16299
* Unity 2018.1

Expand All @@ -35,7 +33,7 @@ An HTTP provider must be configured using `GrpcChannelOptions.HttpHandler`. If a

> `System.PlatformNotSupportedException`: gRPC requires extra configuration to successfully make RPC calls on .NET implementations that don't have support for gRPC over HTTP/2. An HTTP provider must be specified using `GrpcChannelOptions.HttpHandler`. The configured HTTP provider must either support HTTP/2 or be configured to use gRPC-Web.
.NET implementations that don't support HTTP/2, such as UWP, Xamarin, and Unity, can use gRPC-Web as an alternative.
.NET implementations that don't support HTTP/2, such as UWP and Unity, can use gRPC-Web as an alternative.

```csharp
var channel = GrpcChannel.ForAddress("https://localhost:5001", new GrpcChannelOptions
Expand Down Expand Up @@ -90,9 +88,9 @@ var response = await client.SayHelloAsync(new HelloRequest { Name = ".NET" });

## gRPC C# core-library

An alternative option for .NET Framework and Xamarin has been to use [gRPC C# core-library](https://grpc.io/docs/languages/csharp/quickstart/) to make gRPC calls. gRPC C# core-library is:
An alternative option for .NET Framework has been to use [gRPC C# core-library](https://grpc.io/docs/languages/csharp/quickstart/) to make gRPC calls. gRPC C# core-library is:

* A third party library that supports making gRPC calls over HTTP/2 on .NET Framework and Xamarin.
* A third party library that supports making gRPC calls over HTTP/2 on .NET Framework.
* Not supported by Microsoft.
* In maintenance mode and will be [deprecated in favour of gRPC for .NET](https://grpc.io/blog/grpc-csharp-future/).
* Not recommended for new apps.
Expand Down
6 changes: 2 additions & 4 deletions aspnetcore/grpc/supported-platforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ author: jamesnk
description: Learn about the supported platforms for gRPC on .NET.
monikerRange: '>= aspnetcore-3.0'
ms.author: wpickett
ms.date: 10/27/2022
ms.date: 01/08/2025
uid: grpc/supported-platforms
---
# gRPC on .NET supported platforms
Expand Down Expand Up @@ -89,7 +89,7 @@ For information about configuring ASP.NET Core servers to run gRPC, see <xref:gr

The [Grpc.Net.Client](https://www.nuget.org/packages/Grpc.Net.Client/) package supports gRPC calls over HTTP/2 on .NET Core 3 and .NET 5 or later.

Limited support is available for gRPC over HTTP/2 on .NET Framework. Other .NET versions such as UWP, Xamarin and Unity don't have required HTTP/2 support, and must use gRPC-Web instead.
Limited support is available for gRPC over HTTP/2 on .NET Framework. Other .NET versions such as UWP and Unity don't have required HTTP/2 support, and must use gRPC-Web instead.

The following table lists .NET implementations and their gRPC client support:

Expand All @@ -101,8 +101,6 @@ The following table lists .NET implementations and their gRPC client support:
| .NET Framework 4.6.1 | ⚠️&dagger; | ✔️ |
| Blazor WebAssembly || ✔️ |
| Mono 5.4 || ✔️ |
| Xamarin.iOS 10.14 || ✔️ |
| Xamarin.Android 8.0 || ✔️ |
| Universal Windows Platform 10.0.16299 || ✔️ |
| Unity 2018.1 || ✔️ |

Expand Down
10 changes: 5 additions & 5 deletions aspnetcore/signalr/messagepackhubprotocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Add MessagePack Hub Protocol to ASP.NET Core SignalR.
monikerRange: '>= aspnetcore-2.1'
ms.author: wpickett
ms.custom: mvc
ms.date: 7/16/2021
ms.date: 01/08/2025
uid: signalr/messagepackhubprotocol
---

Expand Down Expand Up @@ -148,7 +148,7 @@ The MessagePack protocol doesn't provide a way to encode the `Kind` value of a `

### MessagePack support in "ahead-of-time" compilation environment

The [MessagePack-CSharp](https://github.com/neuecc/MessagePack-CSharp/tree/v2.1.90) library used by the .NET client and server uses code generation to optimize serialization. As a result, it isn't supported by default on environments that use "ahead-of-time" compilation (such as Xamarin iOS or Unity). It's possible to use MessagePack in these environments by "pre-generating" the serializer/deserializer code. For more information, see [the MessagePack-CSharp documentation](https://github.com/neuecc/MessagePack-CSharp/tree/v2.1.90#aot-code-generation-to-support-unityxamarin). Once you have pre-generated the serializers, you can register them using the configuration delegate passed to `AddMessagePackProtocol`:
The [MessagePack-CSharp](https://github.com/neuecc/MessagePack-CSharp/tree/v2.1.90) library used by the .NET client and server uses code generation to optimize serialization. As a result, it isn't supported by default on environments that use "ahead-of-time" compilation, such as NET Multi-platform App UI (.NET MAUI) or Unity. It's possible to use MessagePack in these environments by "pre-generating" the serializer/deserializer code. For more information, see [the MessagePack-CSharp documentation](https://github.com/neuecc/MessagePack-CSharp/tree/v2.1.90#aot-code-generation-to-support-unityxamarin). Once you have pre-generated the serializers, you can register them using the configuration delegate passed to `AddMessagePackProtocol`:

```csharp
services.AddSignalR()
Expand Down Expand Up @@ -339,7 +339,7 @@ For more information on this limitation, see GitHub issue [aspnet/SignalR#2228](

### MessagePack support in "ahead-of-time" compilation environment

The [MessagePack-CSharp](https://github.com/neuecc/MessagePack-CSharp/tree/v2.1.90) library used by the .NET client and server uses code generation to optimize serialization. As a result, it isn't supported by default on environments that use "ahead-of-time" compilation (such as Xamarin iOS or Unity). It's possible to use MessagePack in these environments by "pre-generating" the serializer/deserializer code. For more information, see [the MessagePack-CSharp documentation](https://github.com/neuecc/MessagePack-CSharp/tree/v2.1.90#aot-code-generation-to-support-unityxamarin). Once you have pre-generated the serializers, you can register them using the configuration delegate passed to `AddMessagePackProtocol`:
The [MessagePack-CSharp](https://github.com/neuecc/MessagePack-CSharp/tree/v2.1.90) library used by the .NET client and server uses code generation to optimize serialization. As a result, it isn't supported by default on environments that use "ahead-of-time" compilation, such as NET Multi-platform App UI (.NET MAUI) or Unity. It's possible to use MessagePack in these environments by "pre-generating" the serializer/deserializer code. For more information, see [the MessagePack-CSharp documentation](https://github.com/neuecc/MessagePack-CSharp/tree/v2.1.90#aot-code-generation-to-support-unityxamarin). Once you have pre-generated the serializers, you can register them using the configuration delegate passed to `AddMessagePackProtocol`:

```csharp
services.AddSignalR()
Expand Down Expand Up @@ -524,7 +524,7 @@ For more information on this limitation, see GitHub issue [aspnet/SignalR#2228](

### MessagePack support in "ahead-of-time" compilation environment

The [MessagePack-CSharp](https://github.com/neuecc/MessagePack-CSharp/tree/v1.8.80) library used by the .NET client and server uses code generation to optimize serialization. As a result, it isn't supported by default on environments that use "ahead-of-time" compilation (such as Xamarin iOS or Unity). It's possible to use MessagePack in these environments by "pre-generating" the serializer/deserializer code. For more information, see [the MessagePack-CSharp documentation](https://github.com/neuecc/MessagePack-CSharp/tree/v1.8.80#pre-code-generationunityxamarin-supports). Once you have pre-generated the serializers, you can register them using the configuration delegate passed to `AddMessagePackProtocol`:
The [MessagePack-CSharp](https://github.com/neuecc/MessagePack-CSharp/tree/v1.8.80) library used by the .NET client and server uses code generation to optimize serialization. As a result, it isn't supported by default on environments that use "ahead-of-time" compilation, such as NET Multi-platform App UI (.NET MAUI) or Unity. It's possible to use MessagePack in these environments by "pre-generating" the serializer/deserializer code. For more information, see [the MessagePack-CSharp documentation](https://github.com/neuecc/MessagePack-CSharp/tree/v1.8.80#pre-code-generationunityxamarin-supports). Once you have pre-generated the serializers, you can register them using the configuration delegate passed to `AddMessagePackProtocol`:

```csharp
services.AddSignalR()
Expand Down Expand Up @@ -703,7 +703,7 @@ For more information on this limitation, see GitHub issue [aspnet/SignalR#2228](

### MessagePack support in "ahead-of-time" compilation environment

The [MessagePack-CSharp](https://github.com/neuecc/MessagePack-CSharp/tree/v1.8.80) library used by the .NET client and server uses code generation to optimize serialization. As a result, it isn't supported by default on environments that use "ahead-of-time" compilation (such as Xamarin iOS or Unity). It's possible to use MessagePack in these environments by "pre-generating" the serializer/deserializer code. For more information, see [the MessagePack-CSharp documentation](https://github.com/neuecc/MessagePack-CSharp/tree/v1.8.80#pre-code-generationunityxamarin-supports). Once you have pre-generated the serializers, you can register them using the configuration delegate passed to `AddMessagePackProtocol`:
The [MessagePack-CSharp](https://github.com/neuecc/MessagePack-CSharp/tree/v1.8.80) library used by the .NET client and server uses code generation to optimize serialization. As a result, it isn't supported by default on environments that use "ahead-of-time" compilation, such as NET Multi-platform App UI (.NET MAUI) or Unity. It's possible to use MessagePack in these environments by "pre-generating" the serializer/deserializer code. For more information, see [the MessagePack-CSharp documentation](https://github.com/neuecc/MessagePack-CSharp/tree/v1.8.80#pre-code-generationunityxamarin-supports). Once you have pre-generated the serializers, you can register them using the configuration delegate passed to `AddMessagePackProtocol`:

```csharp
services.AddSignalR()
Expand Down
4 changes: 2 additions & 2 deletions aspnetcore/signalr/supported-platforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Learn about the supported platforms for ASP.NET Core SignalR.
monikerRange: '>= aspnetcore-3.1'
ms.author: wpickett
ms.custom: mvc, devx-track-js
ms.date: 09/15/2021
ms.date: 01/09/2025
uid: signalr/supported-platforms
---
# ASP.NET Core SignalR supported platforms
Expand All @@ -31,7 +31,7 @@ The JavaScript client doesn't support Internet Explorer and other older browsers

## .NET client

The [.NET client](xref:signalr/dotnet-client) runs on any platform supported by ASP.NET Core. For example, [Xamarin developers can use SignalR](https://github.com/aspnet/Announcements/issues/305) for building Android apps using Xamarin.Android 8.4.0.1 and later and iOS apps using Xamarin.iOS 11.14.0.4 and later.
The [.NET client](xref:signalr/dotnet-client) runs on any platform supported by ASP.NET Core. For example, [.NET Multi-platform App UI (.NET MAUI) developers can use SignalR](https://github.com/aspnet/Announcements/issues/305) for building Android and iOS apps.

If the server runs IIS, the WebSockets transport requires IIS 8.0 or later on Windows Server 2012 or later. Other transports are supported on all platforms.

Expand Down
4 changes: 2 additions & 2 deletions aspnetcore/whats-new/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ landingContent:
linkLists:
- linkListType: whats-new
links:
- text: Xamarin docs updates
url: /xamarin/whats-new/
- text: .NET Multi-platform App UI (.NET MAUI) docs updates
url: /dotnet/maui/whats-new/
- text: .NET Core release notes
url: https://github.com/dotnet/core/blob/main/release-notes/README.md
- text: ASP.NET Core release notes
Expand Down

0 comments on commit 6474dea

Please sign in to comment.