.NET docs: What's new for the .NET 7 release
Welcome to what's new in the .NET docs for the .NET 7 release. This article lists some of the major changes to docs related to .NET feature updates.
.NET breaking changes
.NET fundamentals
New articles
- What's new in .NET 7
- Introduction to AOT warnings
- Diagnostic monitoring and collection utility (dotnet-monitor)
- Containerize a .NET app with dotnet publish
- System.Threading.Channels library
- Rate limit an HTTP handler in .NET
- Upgrade a WCF Server-side Project to use CoreWCF on .NET 6
- dotnet workload command
- NuGet signed package verification
- .NET SDK error list
- SYSLIB diagnostics for regex source generation
- SYSLIB diagnostics for p/invoke source generation
- SYSLIB diagnostics for JavaScript interop source generation
- SYSLIB0038: SerializationFormat.Binary is obsolete
- SYSLIB0039: SslProtocols.Tls and SslProtocols.Tls11 are obsolete
- SYSLIB0040: EncryptionPolicy.NoEncryption and EncryptionPolicy.AllowNoEncryption are obsolete
- SYSLIB0041: Some Rfc2898DeriveBytes constructors are obsolete
- SYSLIB0042: FromXmlString and ToXmlString on ECC types are obsolete
- SYSLIB0043: ECDiffieHellmanPublicKey.ToByteArray is obsolete
- SYSLIB0044: AssemblyName.CodeBase and AssemblyName.EscapedCodeBase are obsolete
- SYSLIB0046: ControlledExecution.Run should not be used
- SYSLIB0047: XmlSecureResolver is obsolete
- CA2019:
ThreadStatic
fields should not use inline initialization - CA2259: Ensure
ThreadStatic
is only used with static fields - CA1420: Property, type, or attribute requires runtime marshalling
- CA1422: Validate platform compatibility - obsoleted APIs
- CA2260: Implement generic math interfaces correctly
- CA1854: Prefer the
IDictionary.TryGetValue(TKey, out TValue)
method - CA1851: Possible multiple enumerations of
IEnumerable
collection - Prefer 'null' check over type check (IDE0150)
- Simplify property pattern (IDE0170)
- Use tuple to swap values (IDE0180)
- Namespace declaration preferences (IDE0160 and IDE0161)
- .NET regular expression source generators
- Generic math
- Source generation for platform invokes
- Source generation for custom marshalling
- Tutorial: Use custom marshallers in source-generated P/Invokes
- Customize a JSON contract
Updated articles
- .NET introduction - Add new information for .NET 7.
- .NET SDK - Add new tools and libraries for .NET 7.
- Native AOT Deployment - Document AOT analysis warnings
- Single-file deployment and executable - Update single file incompatibility docs
- Prepare .NET libraries for trimming- Update trimming libraries docs
- Trimming options - Cleanup trimming options and document TrimMode=full,partial
- Tutorial: Containerize a .NET app - Add
dotnet publish
article for .NET 7 containerization support. - Rate limit an HTTP handler in .NET - New
RateLimiter
article showing a custom HTTP handler - Configuration providers in .NET - Environment variable prefix breaking change
- Use HTTP/3 with HttpClient - Update HTTP/3 support for HttpClient in .NET 7
- IHttpClientFactory with .NET - New
HttpClient
article - Overview of .NET, MSBuild, and Visual Studio versioning
- Add preview SDK table
- Formalize versioning support policy
- Upgrade a WCF Server-side Project to use CoreWCF on .NET 6 - Add documentation for CoreWCF extension on Upgrade Assistant
- .NET RID Catalog - Add iOS and Android RIDs
- Runtime configuration options for threading - Document a new config switch added to the portable thread pool
- MSBuild reference for .NET SDK projects
- Add three new properties
- Add docs for project properties that control PDBs and XML publishing
- Update the documentation for PublishRelease and PackRelease
- Add DisableTransitiveProjectReferences
- Cleanup trimming options and document TrimMode=full,partial
- Document new PublishRelease and PackRelease properties
- Manage package dependencies in .NET applications - Add three new properties
- .NET default templates for dotnet new - Added the two new Blazor empty templates
- .NET SDK and .NET CLI telemetry
- Add the PublishProtocol property to the list of telemetry data disclosures
- document SDK telemetry from prior and upcoming versions
- dotnet new install - New syntax for
dotnet new
- dotnet new list - New syntax for
dotnet new
- dotnet new search - New syntax for
dotnet new
- dotnet new uninstall - New syntax for
dotnet new
- dotnet new update - New syntax for
dotnet new
- dotnet new <TEMPLATE> - New syntax for
dotnet new
- dotnet restore - Document .NET 7 SDK changes to NuGet signed package verification
- dotnet publish - Document Publish UseCurrentRuntime
- dotnet build - Document UseCurrentRuntime
- dotnet watch - Note that --non-interactive is .NET 7
- dotnet nuget sign - Document .NET 7 SDK changes to NuGet signed package verification
- dotnet nuget trust - Document .NET 7 SDK changes to NuGet signed package verification
- dotnet nuget verify - Document .NET 7 SDK changes to NuGet signed package verification
- .NET SDK error list
- Add new errors/warnings to NETSDK error index
- Document selected NETSDK error messages
- List of NETSDK error messages
- NETSDK1100: Set the EnableWindowsTargeting property to true
- Add three new properties
- Document selected NETSDK error messages
- dotnet-coverage code coverage utility - Adding new options and example scenarios
- .NET additional tools overview - Add dotnet-monitor .NET tool documentation
- Diagnostics client library - Add dotnet-monitor .NET tool documentation
- Collect diagnostics in containers - Add dotnet-monitor .NET tool documentation
- What diagnostic tools are available in .NET Core? - Add dotnet-monitor .NET tool documentation
- Source-generator diagnostics in .NET 6+ - Add SYSLIB diagnostics for .NET 7 source generators
- Obsolete features in .NET 5+
- Add two new SYSLIB warnings
- XmlSecureResolver breaking change
- Add SYSLIB0041
- Add SYSLIB0040
- Add syslib0038 and syslib0039
- SYSLIB0012: Assembly.CodeBase and Assembly.EscapedCodeBase are obsolete - Add two new SYSLIB warnings
- SYSLIB0043: ECDiffieHellmanPublicKey.ToByteArray is obsolete
- XmlSecureResolver breaking change
- Add SYSLIB0041
- Code quality rules
- Add docs for CA2019 and CA2259
- Add docs for CA1420 and CA1422
- Add doc for CA2260
- Add documentation for rule CA1854
- Add document for CA1851
- Reliability rules - Add docs for CA2019 and CA2259
- Usage rules
- Add docs for CA2019 and CA2259
- Add doc for CA2260
- CA1416: Validate platform compatibility - Add docs for CA1420 and CA1422
- CA1418: Validate platform compatibility - Add docs for CA1420 and CA1422
- Portability and interoperability rules - Add docs for CA1420 and CA1422
- Code-style rule options - Add missing code-style rules
- Use local function instead of lambda (IDE0039) - Add missing code-style rules
- Code-style rules
- Add missing code-style rules
- Add IDE0160 and IDE0161.
- Performance rules
- Add documentation for rule CA1854
- Add document for CA1851
- Language rules
- Add missing code-style rules
- Add IDE0160 and IDE0161.
- .NET runtime contention events - Update the doc with the new version of ContentionStart
- Error codes returned by package validation
- add docs for diagnostics CP0012 and CP0013
- add docs for diagnostics CP0010 and CP0011
- .NET regular expressions - Ported as conceptual article from .NET dev blog:
Regex
enhancements with .NET 7 - Standard numeric format strings - Limit precision to 999,999,999
- Character encoding in .NET - Write content for UTF-8 string literals for C# 11.
- Parsing numeric strings in .NET - Generic math docs
- Generics in .NET - Generic math docs
- Generic interfaces in .NET - Generic math docs
- Runtime libraries overview - New
HttpClient
article - Target frameworks in SDK-style projects - Update TFMs for .NET 7
- Source generation for platform invokes
- Add SYSLIB diagnostics for .NET 7 source generators
- Custom marshaller tutorial
- Basic overview of p/invoke source generation
- Tutorial: Use custom marshallers in source-generated P/Invokes - Custom marshaller tutorial
- How to choose reflection or source generation in System.Text.Json - Source generation for STJ update
- How to use source generation in System.Text.Json - Source generation for STJ update
- How to write custom converters for JSON serialization (marshalling) in .NET
- Add section on Utf8JsonReader.CopyString
- Add contract customization article
- How to use Utf8JsonReader in System.Text.Json - Add section on Utf8JsonReader.CopyString
- Compare Newtonsoft.Json to System.Text.Json, and migrate to System.Text.Json - Add contract customization article
- How to preserve references and handle or ignore circular references in System.Text.Json - Add contract customization article
- How to serialize properties of derived classes with System.Text.Json -
System.Text.Json
polymorphism updates for .NET 7
.NET IoT libraries
Updated articles
- Read values from an analog-to-digital converter - Retire the "What's new in C# 8" article
- Blink an LED - Retire the "What's new in C# 8" article
- Display text on an LCD - Retire the "What's new in C# 8" article
- Read environmental conditions from a sensor - Retire the "What's new in C# 8" article
Architecture guides
New articles
- Accessing remote data
- Authentication and Authorization
- Communicating between loosely coupled components
- Configuration management
- Dependency injection
- Enterprise Application Patterns Using .NET MAUI
- Introduction to .NET MAUI
- Containerized Microservices
- Model-View-ViewModel (MVVM)
- Navigation
- Purpose
- Unit testing
- Validation
Updated articles
- .NET application architecture documentation - .NET MAUI eBook
Azure SDK for .NET
Updated articles
- Pagination with the Azure SDK for .NET - Retire the "What's new in C# 8" article
C# language
New articles
- What's new in C# 11
- file (C# Reference)
- required modifier (C# Reference)
ref
structure types (C# reference)- Declaration statements
Updated articles
- Integral numeric types (C# reference) - Add updates for numeric IntPtr
- Built-in reference types (C# reference) - Write content for UTF-8 string literals for C# 11.
- Structure types (C# reference) -
ref
fields andscoped
. Modify pages on struct creation, variable declaration, and ref struct. - file (C# Reference) - Language reference updates for
file
scoped types - Interface (C# Reference)
- Generic math docs
- Add information on static virtual interface members
- required modifier (C# Reference) - C# 11: required members
- Bitwise and shift operators (C# reference) - Operator updates to support generic math
- nameof expression (C# reference)- Extended nameof parameter scope
- checked and unchecked statements (C# reference) - Publish C# 11 speclets
- $ - string interpolation (C# reference) - C# 11 preview features: newlines in string interpolation
- Access Modifiers (C# Reference) - Language reference updates for
file
scoped types - ref (C# Reference) -
ref
fields andscoped
. Modify pages on struct creation, variable declaration, and ref struct. - Assignment operators (C# reference) -
ref
fields andscoped
. Modify pages on struct creation, variable declaration, and ref struct. - Avoid allocations
ref
fields andscoped
. Modify pages on struct creation, variable declaration, and ref struct.- Add updates for numeric IntPtr
- + and += operators (C# reference) - Write content for UTF-8 string literals for C# 11.
- Tutorial: Explore C# 11 feature - static virtual members in interfaces - Generic math docs
- Miscellaneous attributes interpreted by the C# compiler - C# 11: required members
- Auto-Implemented Properties (C# Programming Guide) - C# 11: required members
- Fields (C# Programming Guide) - C# 11: required members
- How to declare and use read write properties (C# Programming Guide) - C# 11: required members
- How to implement a lightweight class with auto-implemented properties (C# Programming Guide) - C# 11: required members
- Properties (C# Programming Guide) - C# 11: required members
- Using Properties (C# Programming Guide) - C# 11: required members
- Properties - C# 11: required members
- Constraints on type parameters (C# Programming Guide) - Add information on static virtual interface members
- Generic Interfaces (C# Programming Guide) - Add information on static virtual interface members
- Built-in types (C# reference) - Add updates for numeric
IntPtr
- Built-in numeric conversions (C# reference) - Add updates for numeric
IntPtr
- Arithmetic operators (C# reference) - Operator updates to support generic math
- Determine caller information using attributes interpreted by the C# compiler - Extended
nameof
parameter scope - Attributes for null-state static analysis interpreted by the C# compiler - Extended
nameof
parameter scope - delegate operator (C# reference) - Document new method group conversion
- Generics and Attributes (C# Programming Guide) - generic attributes are allowed in C# 11
Microsoft Orleans
New articles
Updated articles
- Orleans transactions - Describe new APIs for .NET 7
- Microsoft Orleans documentation - What's new Orleans
Community contributors
The following people contributed to the .NET docs during this period. Thank you! Learn how to contribute by following the links under "Get involved" in the what's new landing page.
- CollinAlpert - Collin Alpert
- gleocadie - Gregory LEOCADIE
- michaelstonis - Michael Stonis
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for