-
Notifications
You must be signed in to change notification settings - Fork 2
(sdks) Add new page on .NET/C# version compatibility #1393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
| </Accordion> | ||
| </AccordionGroup> | ||
|
|
||
| ## Distribution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can get rid of this section. We don't need to teach users how to publish their own NuGet packages, just how to consume the package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, removed
| @@ -0,0 +1,270 @@ | |||
| --- | |||
| title: .NET Framework compatibility | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| description: Learn about supported .NET Framework versions (net462, net472, net48) and Unity compatibility for Fern-generated SDKs. | ||
| --- | ||
|
|
||
| Fern-generated .NET SDKs support older .NET Framework versions (`net462`, `net472`, `net48`) and Unity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's provide the full table of .NET versions we support, including modern .NET versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a full list and removed notes
| | **net462** | Windows 7 SP1 / Server 2008 R2 | Oldest supported for modern builds. Limited TLS support, older BCL. | | ||
| | **net472** | Windows 7 SP1 / Server 2008 R2 | Broad compatibility, supported for most enterprise apps. | | ||
| | **net48** | Windows 7 SP1 / Server 2008 R2 | Latest .NET Framework version with best long-term support. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Windows version and Notes are TMI IMO
|
|
||
| Use the **Roslyn compiler** (`csc`) that comes with Visual Studio 2022+ or the .NET SDK. Set your C# version via `<LangVersion>` to `latest`, `preview`, or a specific version (minimum `9`). | ||
|
|
||
| Fern's .NET SDK doesn't support the legacy Mono compiler (`mcs`, `gmcs`). Use Roslyn even when building on Mono. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also mention the old csc that is not supported, the non-mono one
|
|
||
| Most modern C# features work on `net462`, `net472`, and `net48`, but a few require workarounds: | ||
|
|
||
| - **`init` accessors** – Requires the `System.Runtime.CompilerServices.IsExternalInit` type. Add a small shim in your project or reference a helper package. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only the case when users try to use init in their own code, right? This is not something that the user is challenged with when consuming Fern generated .NET SDKs?
This shim is automatically added by Polysharp, no?
@fearthecowboy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yyyyeeeees. Yes. You are correct sir.
I did forget that polysharp was in there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just deleted this section since based on this comment it didn't seem relevant to the page's audience? I also removed "Type or namespace IsExternalInit not found" since that seemed to be the same use case, but lmk if that's not right.

No description provided.