C# 7.3–13 + .NET Framework 4.8.1 + Roslyn

6 views
Skip to first unread message

Kiquenet

unread,
Apr 1, 2026, 7:23:29 AM (4 days ago) Apr 1
to AltNet-Hispano

stack: solution sln + NET Frk 4.8.1 + few csproj NET Frk 4.5 + Visual Studio 202 + Azure Devops
C# 7.3–12 in .NET Framework 4.8.1 use Roslyn ?

Can a .NET Framework 4.8 website use C# 7 features without bundling Roslyn?
https://stackoverflow.com/questions/76093222/can-a-net-framework-4-8-website-use-c-sharp-7-features-without-bundling-roslyn

.NET compiler platform package version reference
4.14.0 Visual Studio 2022 version 17.14
https://learn.microsoft.com/en-us/visualstudio/extensibility/roslyn-version-support?view=visualstudio

Does C# 8 Support .NET Framework? Exploring Visual Studio 2019 Build Settings Compatibility
https://www.codestudy.net/blog/does-c-8-support-the-net-framework/

Questions about the roslyn version
https://github.com/dotnet/roslyn/discussions/50395

<LangVersion>7.3</LangVersion>
or
<LangVersion>latest</LangVersion>

<PackageReference Include=“Microsoft.Net.Compilers” Version=“4.12.0” PrivateAssets=“all” />

.editorconfig o Directory.Build.props
dotnet_language_version = 7.3

❌ **C# 8.0
  • using var (Using declarations)
  • await using
  • Switch expressions
  • ?? = null‑coalescing assignment
  • Pattern matching avanzado
  • static local functions
  • Nullable Reference Types (string?)

runtime (NO .NET Framework)

  • Default Interface Methods
  • Ranges & Indices (^11..3)
  • Async Streams (await foreach)
❌ C# 9.0
  • Records
  • Init‑only properties (init;)
  • Top‑level statements
  • Target‑typed new()
❌ C# 10.0
  • File‑scoped namespaces
  • Global usings
  • Record structs
  • sealed + ToString improvements de records
  • λ
❌ C# 11 (VS2022 / .NET 7)
  • required members
  • Generic attributes
  • Raw string literals (""" ... """)
  • List patterns ([a, .., b])
❌ C# 12 (.NET 8/9)
  • Primary constructors en clases
  • Collection expressions ([1, 2, 3])
  • Alias de operadores (operator "add")
❌ C# 13 (VS2026 / .NET 10)
Reply all
Reply to author
Forward
0 new messages