Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: "Breaking change: OpenSSL cryptographic primitives aren't supported on macOS"
title: "Breaking change: OpenSSL cryptographic primitives not supported on macOS"
description: "Learn about the breaking change in .NET 10 where OpenSSL cryptographic primitives are no longer supported on macOS."
ms.date: 06/23/2025
ai-usage: ai-assisted
ms.custom: https://github.com/dotnet/docs/issues/46789
---
# OpenSSL cryptographic primitives are not supported on macOS
# OpenSSL cryptographic primitives not supported on macOS

Starting in .NET 10, OpenSSL-backed cryptographic primitives are no longer supported on macOS. <xref:System.Security.Cryptography.AesCcm?displayProperty=fullName> and classes that are specific to OpenSSL, such as <xref:System.Security.Cryptography.RSAOpenSsl?displayProperty=fullName>, now throw a <xref:System.PlatformNotSupportedException> on macOS.

Expand Down
12 changes: 9 additions & 3 deletions docs/core/compatibility/unsupported-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
title: Unsupported APIs on .NET Core and .NET 5+
titleSuffix: ""
description: Learn which .NET APIs always throw an exception on .NET Core and .NET 5 and later versions.
ms.date: 09/08/2025
ms.date: 11/07/2025
---
# APIs that always throw exceptions on .NET Core and .NET 5+
# APIs that always throw exceptions on .NET (Core)

The following APIs will always throw an exception on .NET (Core) on all or a subset of platforms. In most cases, the exception that's thrown is <xref:System.PlatformNotSupportedException>.
The following APIs always throw an exception on .NET (Core) on all or a subset of platforms. In most cases, the exception that's thrown is <xref:System.PlatformNotSupportedException>.

This article organizes the affected APIs by namespace.

Expand Down Expand Up @@ -242,6 +242,7 @@ This article organizes the affected APIs by namespace.

| Member | Platforms that throw |
|--------|----------------------|
| <xref:System.Security.Cryptography.AesCcm.%23ctor*> | macOS |
| <xref:System.Security.Cryptography.AsymmetricAlgorithm.Create(System.String)?displayProperty=nameWithType> | All |
| <xref:System.Security.Cryptography.CngAlgorithm?displayProperty=nameWithType> | Linux and macOS |
| <xref:System.Security.Cryptography.CngAlgorithmGroup?displayProperty=nameWithType> | Linux and macOS |
Expand All @@ -264,14 +265,17 @@ This article organizes the affected APIs by namespace.
| <xref:System.Security.Cryptography.CspKeyContainerInfo.RandomlyGenerated?displayProperty=nameWithType> | Linux and macOS |
| <xref:System.Security.Cryptography.CspKeyContainerInfo.Removable?displayProperty=nameWithType> | Linux and macOS |
| <xref:System.Security.Cryptography.CspKeyContainerInfo.UniqueKeyContainerName?displayProperty=nameWithType> | Linux and macOS |
| <xref:System.Security.Cryptography.DSAOpenSsl.%23ctor*> | macOS |
| <xref:System.Security.Cryptography.ECDiffieHellmanCng.FromXmlString(System.String,System.Security.Cryptography.ECKeyXmlFormat)?displayProperty=nameWithType> | All |
| <xref:System.Security.Cryptography.ECDiffieHellmanCng.ToXmlString(System.Security.Cryptography.ECKeyXmlFormat)?displayProperty=nameWithType> | All |
| <xref:System.Security.Cryptography.ECDiffieHellmanCngPublicKey.FromXmlString(System.String)?displayProperty=nameWithType> | All |
| <xref:System.Security.Cryptography.ECDiffieHellmanCngPublicKey.ToXmlString?displayProperty=nameWithType> | All |
| <xref:System.Security.Cryptography.ECDiffieHellmanOpenSsl.%23ctor*> | macOS |
| <xref:System.Security.Cryptography.ECDiffieHellmanPublicKey.ToByteArray?displayProperty=nameWithType> | Linux and macOS |
| <xref:System.Security.Cryptography.ECDiffieHellmanPublicKey.ToXmlString?displayProperty=nameWithType> | All |
| <xref:System.Security.Cryptography.ECDsaCng.FromXmlString(System.String,System.Security.Cryptography.ECKeyXmlFormat)?displayProperty=nameWithType> | All |
| <xref:System.Security.Cryptography.ECDsaCng.ToXmlString(System.Security.Cryptography.ECKeyXmlFormat)?displayProperty=nameWithType> | All |
| <xref:System.Security.Cryptography.ECDsaOpenSsl.%23ctor*> | macOS |
| <xref:System.Security.Cryptography.HashAlgorithm.Create?displayProperty=nameWithType> | All |
| <xref:System.Security.Cryptography.HMAC.Create?displayProperty=nameWithType> | All |
| <xref:System.Security.Cryptography.HMAC.Create(System.String)?displayProperty=nameWithType> | All |
Expand All @@ -284,10 +288,12 @@ This article organizes the affected APIs by namespace.
| <xref:System.Security.Cryptography.ProtectedData.Unprotect%2A?displayProperty=nameWithType> | Linux and macOS |
| <xref:System.Security.Cryptography.RSACryptoServiceProvider.DecryptValue(System.Byte[])?displayProperty=fullName> | All |
| <xref:System.Security.Cryptography.RSACryptoServiceProvider.EncryptValue(System.Byte[])?displayProperty=fullName> | All |
| <xref:System.Security.Cryptography.RSAOpenSsl.%23ctor*> | macOS |
| <xref:System.Security.Cryptography.RSA.DecryptValue(System.Byte[])?displayProperty=fullName> | All |
| <xref:System.Security.Cryptography.RSA.EncryptValue(System.Byte[])?displayProperty=fullName> | All |
| <xref:System.Security.Cryptography.RSA.FromXmlString%2A?displayProperty=nameWithType> | All |
| <xref:System.Security.Cryptography.RSA.ToXmlString%2A?displayProperty=nameWithType> | All |
| <xref:System.Security.Cryptography.SafeEvpPKeyHandle?displayProperty=nameWithType> | macOS |
| <xref:System.Security.Cryptography.SymmetricAlgorithm.Create?displayProperty=nameWithType> | All |
| <xref:System.Security.Cryptography.SymmetricAlgorithm.Create(System.String)?displayProperty=nameWithType> | All |

Expand Down
3 changes: 3 additions & 0 deletions docs/core/tutorials/netcore-hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ You also need to build a .NET component to test the host with, so you should ins

Hosting the .NET runtime is done with the `nethost` and `hostfxr` libraries' APIs. These entry points handle the complexity of finding and setting up the runtime for initialization and allow both launching a managed application and calling into a static managed method.

> [!IMPORTANT]
> The `nethost` and `hostfxr` hosting APIs only support framework-dependent deployments. Self-contained deployments should be treated as stand-alone executables. If you're evaluating deployment models for your application, use a framework-dependent deployment to ensure compatibility with these native hosting APIs.

## Create a host using `nethost.h` and `hostfxr.h`

A [sample host](https://github.com/dotnet/samples/tree/main/core/hosting) demonstrating the steps outlined in the tutorial below is available in the dotnet/samples GitHub repository. Comments in the sample clearly associate the numbered steps from this tutorial with where they're performed in the sample. For download instructions, see [Samples and Tutorials](../../samples-and-tutorials/index.md#view-and-download-samples).
Expand Down
2 changes: 1 addition & 1 deletion docs/core/whats-new/dotnet-10/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ The F# updates in .NET 10 include several new features and improvements across t

General improvements and bug fixes in the compiler implementation.

For more information, see the [F# release notes](https://fsharp.github.io/fsharp-compiler-docs/release-notes/About.html).
For more information, see [What's new in F# 10](../../../fsharp/whats-new/fsharp-10.md) or the [F# release notes](https://fsharp.github.io/fsharp-compiler-docs/release-notes/About.html).

## Visual Basic

Expand Down
2 changes: 2 additions & 0 deletions docs/fsharp/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ landingContent:
linkLists:
- linkListType: whats-new
links:
- text: "What's new in F# 10"
url: whats-new/fsharp-10.md
- text: "What's new in F# 9"
url: whats-new/fsharp-9.md
- text: "What's new in F# 8"
Expand Down
2 changes: 2 additions & 0 deletions docs/fsharp/language-reference/computation-expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ The following table describes methods that can be used in a workflow builder cla
|`Delay`|`(unit -> M<'T>) -> Delayed<'T>`|Wraps a computation expression as a function. `Delayed<'T>` can be any type, commonly `M<'T>` or `unit -> M<'T>` are used. The default implementation returns a `M<'T>`.|
|`Return`|`'T -> M<'T>`|Called for `return` in computation expressions.|
|`ReturnFrom`|`M<'T> -> M<'T>`|Called for `return!` in computation expressions.|
|`ReturnFromFinal`|`M<'T> -> M<'T>`|If present, called for `return!` and `do!` when in tail-call position.|
|`BindReturn`|`(M<'T1> * ('T1 -> 'T2)) -> M<'T2>`|Called for an efficient `let! ... return` in computation expressions.|
|`BindNReturn`|`(M<'T1> * M<'T2> * ... * M<'TN> * ('T1 * 'T2 ... * 'TN -> M<'U>)) -> M<'U>`|Called for efficient `let! ... and! ... return` in computation expressions without merging inputs.<br /><br />for example, `Bind3Return`, `Bind4Return`.|
|`MergeSources`|`(M<'T1> * M<'T2>) -> M<'T1 * 'T2>`|Called for `and!` in computation expressions.|
Expand All @@ -277,6 +278,7 @@ The following table describes methods that can be used in a workflow builder cla
|`While`|`(unit -> bool) * Delayed<'T> -> M<'T>`or<br /><br />`(unit -> bool) * Delayed<unit> -> M<unit>`|Called for `while...do` expressions in computation expressions.|
|`Yield`|`'T -> M<'T>`|Called for `yield` expressions in computation expressions.|
|`YieldFrom`|`M<'T> -> M<'T>`|Called for `yield!` expressions in computation expressions.|
|`YieldFromFinal`|`M<'T> -> M<'T>`|If present, called for `yield!` when in tail-call position and in case of `do!` in tail-call position as a fallback for `ReturnFromFinal`|
|`Zero`|`unit -> M<'T>`|Called for empty `else` branches of `if...then` expressions in computation expressions.|
|`Quote`|`Quotations.Expr<'T> -> Quotations.Expr<'T>`|Indicates that the computation expression is passed to the `Run` member as a quotation. It translates all instances of a computation into a quotation.|

Expand Down
12 changes: 12 additions & 0 deletions docs/fsharp/language-reference/parameters-and-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,18 @@ Baud Rate: 9600 Duplex: Full Parity: false
Baud Rate: 4800 Duplex: Half Parity: false
```

You can also specify an optional parameter to be a [Value Option](./value-options.md) type by applying a `[<Struct>]` attribute to it.

```fsharp
type T() =
static member M([<Struct>] ?p : string) =
match p with
| ValueSome s -> printfn "%s" s
| ValueNone -> printfn "None"
```

When using struct-backed optional parameter, as seen above, you would use `defaultValueArg` instead of `defaultArg` to set the default value of the parameter.

### Optional parameters (C# interop)

For the purposes of C# interop, you can use the attributes `[<Optional; DefaultParameterValue<(...)>]` in F#, so that callers will see an argument as optional. This is equivalent to defining the argument as optional in C# as in `MyMethod(int i = 3)`. This form was introduced in F# 4.1 to help facilitate interoperation with C# code.
Expand Down
2 changes: 2 additions & 0 deletions docs/fsharp/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ items:
href: tutorials/using-functions.md
- name: What's new
items:
- name: F# 10
href: whats-new/fsharp-10.md
- name: F# 9
href: whats-new/fsharp-9.md
- name: F# 8
Expand Down
Loading
Loading