-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
What's new in .NET 7 Preview 1 [WIP] #7106
Comments
@stephentoub reasonable to blog about regex SG in preview 1? If so, we'll need some content - either from @joperezr or yourself, what do you prefer? It's probably worth its own blog post, but for Preview 1, we'll just need a paragraph/screenshot for the release post. |
We can if you think now's a good time. |
Now that the DllImport generator is in the product too, perhaps we that also deserves a post or at least a mention? @elinor-fung interested in writing up something? I'd imagine it mentions that is what we did and the plan is to make it available to everyone in the future. |
.NET Libraries: Nullable annotations for Microsoft.ExtensionsWe have been making progress on annotating the Microsoft.Extensions.* libraries for nullability. In .NET 7 Preview 1, the following libraries have been annotated for nullability:
You can see the remaining libraries, and follow the progress at dotnet/runtime#43605. By the time .NET 7 is released, we plan on annotating all the Microsoft.Extensions.* libraries for nullability. A huge thank you to @maxkoshevoi who has been contributing the bulk of this effort. Without @maxkoshevoi's help, we would not be nearly as far as we are. |
ObservabilityContinue improving the tracing APIs:
|
Interop: P/Invoke source generationdotnet/runtime#60212 We integrated the p/invoke source generator that was prototyped in .NET 6 into dotnet/runtime and have been converting the runtime libraries to use it. This means the converted p/invokes are AOT-compatible and no longer require an IL stub to be generated at runtime. We intend to make the p/invoke source generator available for use outside the runtime in the future. You can follow our remaining work in dotnet/runtime#60595. |
New APIs in System.Text.JsonSystem.Text.Json ships with a couple of minor quality-of-life enhancements:
|
Mono: Hot ReloadTracking issue: dotnet/runtime#57365
|
System.Drawing.Common: Unix support droppedBased on the .NET 6 announcement made in: https://docs.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/system-drawing-common-windows-only
We removed support for that switch in 7.0-preview1: dotnet/runtime#64084 |
Reverted Console Formatter Change in ASP.NET Core Container ImagesIn .NET 6, the This is a breaking change. If you relied on this environment variable being set to ENV Logging__Console__FormatterName=Json |
Introducing the new Regex Source GeneratorEver wished you had all of the great benefits that come from having a specialized Regex engine that is optimized for your particular pattern, without having to pay the costs of building this engine at runtime? We are excited to announce the new Regex Source Generator which is included in Preview 1. It brings all of the performance benefits from our Compiled engine without the startup cost, and it has additional benefits, like providing a great debugging experience as well as being trimming-friendly. If your pattern is known at compile-time, then the new regex source generator is the way to go. In order to start using it, you only need to turn the containing type into a Before:public class Foo
{
public Regex regex = new Regex(@"abc|def", RegexOptions.IgnoreCase);
public bool Bar(string input)
{
bool isMatch = regex.IsMatch(input);
// ..
}
} After:public partial class Foo // <-- Make the class a partial class
{
[RegexGenerator(@"abc|def", RegexOptions.IgnoreCase)] // <-- Add the RegexGenerator attribute and pass in your pattern and options
public static partial Regex MyRegex(); // <-- Declare the partial method, which will be implemented by the source generator
public bool Bar(string input)
{
bool isMatch = MyRegex().IsMatch(input); // <-- Use the generated engine by invoking the partial method.
// ..
}
} And that's it. Please try it out and let us know if you have any feedback. |
I am reading this as there is no plans to continue attempts to make forms cross-platform, or anything that relies on system.drawing? What was the point of Microsoft taking over the open-source initiatives to make .NET cross-platform, shut down Net Framework by merging in Core only to decide to drop the cross platform support? |
Hello @ajhiggins421, there has never been the plan to make Windows Forms cross-platform; even after it got ported to modern .NET it remains a Windows-only technology. The first link of the post you quoted gives more details about why If you have any more questions I suggest you reply to dotnet/runtime#64084 or open a new issue on |
Correct, Windows Forms and System.Drawing are essentially Windows tech, as they're wrappers over Windows tech. For cross platform UI, you should take a look at MAUI which is being built for that purpose. |
Specifically, Microsoft.Maui.Graphics is the cross-platform graphics library of the future. |
Sorry for the confusion but AFIAK Microsoft does to support Maui on Linux. See: .NET MAUI Layouts Revamped, Developers Question Lack of Linux. Additionally, It is not removal of
I was under the impression the revamping of DotNet under core was to make the framework cross-platform and while specifics on surface areas were not given, I was under the impression except were explicitly stated functionality would be ported. For those not being ported an alternative was being developing, such as WCF and GRPC. I understand Again, I have repeatedly read Microsoft does not support Maui on Linux. So is the developer community to take the removal of System.Drawing as confirmation that there are no plans from Microsoft desktop support short of the community providing one. It's not just |
@ajhiggins421 If you look at the Supported Platforms specifically for Microsoft.Maui.Graphics you'll see that it does support Linux via an abstraction over SkiaSharp. While the complete MAUI platform does not target Linux (yet?), there's no sign of them dropping Linux support from the Graphics component. I personally would love to see MAUI supporting Linux to compete with, e.g., Flutter, but I understand the importance of prioritizing the other operating systems which have a much larger market share. |
Flutter is using Skia to draw controls manually, while MAUI is more about wrapping the platform native controls and abstracting them in a cross-platform way, which can provide much better performance, accessibility and integration, and also enable the ability to draw cross-platform controls using Microsoft.Maui.Graphics. |
.NET 7 GA is available. Closing these pre-release issues. |
What's new in .NET 7 Preview 1
This issue is for teams to highlight work for the community that will release .NET 7 Preview 1
To add content, use a new conversation entry. The entry should include the team name and feature title as the first line as shown in the template below.
Preview 1: #7106
Preview 2: #7107
Preview 3: #7108
Preview 4: #7378
Preview 5: #7441
Preview 6: #7454
Preview 7: #7455
The text was updated successfully, but these errors were encountered: