Microsoft focuses on regex source generation in .NET 7

Microsoft focuses on regex source generation in .NET 7

Second preview release also enhances the SDK with a more intuitive interface.

Credit: Dreamstime

.NET 7, a planned next generation of Microsoft’s .NET software development platform, has moved to a second preview, with the software giant highlighting improvements for regex (regular expression) source generation and the SDK.

For the SDK, the dotnet new command now has a more consistent, intuitive interface for many of the subcommands already in use. Also, support for tab completion of template options and arguments has been “massively” updated, now offering rapid feedback on valid arguments and options as the user types.

A new regex source generator, actually included in Preview 1 but not detailed by Microsoft previously, brings the performance benefits of the compiled engine without the startup cost. It also offers better debugging. If a pattern is known at compile time, then using the new source generator is advisable.

.NET 7 is expected as a production release in November. The second preview, published March 14,  can be downloaded for Windows, Mac, and Linux from Also in Preview 2, NativeAOT, for ahead-of-time compilation, has moved from an experimental status into the runtime. 

But first-class support in the dotnet SDK for publishing projects with NativeAOT in apps still is lacking. That work is expected to be done shortly. In the meantime, developers can try trimming apps to ensure there are no trim warnings. Trimming is a requirement of NativeAOT.

The previous .NET 7 preview was published February 17. Version 7 follows .NET 6, which arrived last November and unified .NET technologies. Microsoft anticipates that upgrading from .NET 6 to .NET 7 should be straightforward.

Follow Us

Join the newsletter!


Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

Tags Microsoft


ARN Innovation Awards 2022

Innovation Awards is the market-leading awards program for celebrating ecosystem innovation and excellence across the technology sector in Australia.

EDGE 2022

EDGE is the leading technology conference for business leaders in Australia and New Zealand, built on the foundations of collaboration, education and advancement.

Brand Post

Channel Roadmap

The Channel Roadmap is a bespoke content hub housing strategic priorities from technology vendors for 2022 and beyond, partners can find the guidance on the key technologies and markets to pursue, to help build a blueprint for future success.

Show Comments