Paul Krill
Editor at Large

Microsoft revs up regex source generation in .NET 7

news
Mar 18, 20222 mins

The second preview release of the next version of Microsoft’s software development platform also enhances the .NET SDK with a more intuitive interface.

binary code streaming from a monitor display
Credit: Thinkstock

.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 dotnet.microsoft.com. 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.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author