No trial. No credit card required. Just your GitHub account.
Announcing ASP.NET Core in .NET 7
.NET 7 is nowreleased! ASP.NET Core in .NET 7 includes everything you need to build rich modern web UI and powerful back-end services.
What’s new?
Here’s a sampling of the great new features and improvements in ASP.NET Core for .NET 7:
- Servers and runtime
- Rating limiting: Limit the rate of handled requests using flexible endpoint configuration and policies.
- Output caching: Configure caching for responses to more efficiently handle requests.
- Request decompression: Accept requests with compressed content.
- HTTP/3: Built-in support for HTTP/3, the latest HTTP version based on the new QUIC multiplexed transport protocol.
- WebSockets over HTTP/2: Use WebSockets over HTTP/2 connections.
- WebTransport (experimental): Create streams and data grams over HTTP/3 with experimental support forWebTransport.
- Minimal APIs
- Endpoint filters: Use endpoint filters to run cross-cutting code before or after a route handler.
- Typed results: Return strongly typed results from minimal APIs.
- Route groups: Organize groups of endpoints with a common prefix
- gRPC
- JSON transcoding: Expand the reach of your gRPC services by also exposing them as JSON-based APIs
- OpenAPI with JSON transcoding (experimenal): Use experimental support for generating OpenAPI specs for your gRPC JSON transcoded services.
- gRPC health checks: Report and check the health of gRPC server apps.
- gRPC client
AddCallCredentials
: Create clients that send authorized requests using bearer tokens.
- SignalR
- Client results: Return client results to the server in response to requests from the server.
- MVC
- Nullable view and page models: Nullable page and view models are now supported to improve the experience when using null state checking.
- Blazor
- Custom elements: Build standard HTML custom elements with Blazor to integrate Blazor components with any JavaScript-based app.
- Handle location changing events: Intercept location changing events to create custom user experiences when navigating.
- Bind after/get/set modifiers: Run async logic after data binding and independently control how data binding gets and sets the data.
- Dynamic authentication requests: Create dynamic authentication requests at runtime with custom parameters to handle advanced authentication scenarios in Blazor WebAssembly apps.
- Improved JavaScript interop on WebAssembly: Optimize JavaScript interop call when running on WebAssembly using the new
[JSImport]
/[JSExport]
support. - WebAssembly SIMD & exception handling: Improve performance with .NET WebAssembly ahead-of-time (AOT) compilation using WebAssembly SIMD and exception handling support.
For a full list of everything that’s new in ASP.NET Core in .NET 7, check out theASP.NET Core in .NET 7 release notes.
Get started
To get started with ASP.NET Core in .NET 7,install the .NET 7 SDK. .NET 7 is also included with Visual Studio 2022. Mac users should use the latest Visual Studio 2022 for Mac preview.
Upgrade an existing project
To upgrade an existing ASP.NET Core app from .NET 6 to .NET 7, follow the steps inMigrate from ASP.NET Core 6.0 to 7.0
To upgrade an existing ASP.NET Core app from .NET 7 RC2 to .NET 7, update all ASP.NET Core package references to7.0.0
.
That’s it! You should be all set to enjoy the benefits of .NET 7.
See also the full list ofbreaking changes in ASP.NET Core for .NET 7.
Join us for the .NET 7 release at .NET Conf 2022
Come celebrate with us and learn all about the .NET 7 release at.NET Conf 2022, a FREE, three day virtual developer event with over 80 sessions featuring speakers from the .NET team and the broader .NET community. The conference starts TODAY and goes from November 8-10. We hope you can join us!
.NET 7 on Azure
.NET 7 is already deployed and ready to be used across your favorite Azure services, likeAzure App Service,Azure Functions, andAzure Static Web Apps. Get started building with .NET 7 on Azure today!
Thank you!
Thank you to everyone in the community who helped make this release of .NET 7 possible! This release represents the culmination of many GitHub issues, pull requests, design feedback comments and documentation updates contributed by many members of the .NET community. We couldn’t have made it to this point without you!
We hope you enjoy this release of ASP.NET Core in .NET 7. We’re eager to hear about your experiences building with it. Let us know about any feedback you have on this release onGitHub.
Thanks again, and happy coding!
Author
Daniel Roth is a Program Manager on the ASP.NET team at Microsoft.
34 comments
Discussion is closed.Login to edit/delete existing comments.
Steve Wasielewski I moved over to WASM and having some issue making restful post calls. Am getting 415 error and seem to have a hard time setting the content-type to application/json.
Am using an httpclient and httprequestmessage, any ideas on what could be the problem?Thanks
Steve
Steve Wasielewski Can you use Windows AD within Blazor WASM?
Rod Macdonald· Edited Read moreI ran the bits for Blazor Hybrid (.NET 7 and the latest VS 17.4) and am planning to stylise the CSS using DevTools. I press CTL+SHFT+I and DevTools opens. I can pick my way thro' the HTML and CSS, but I can't seem to get the tools to jump to the right place when I highlight or click on a Blazor Hybrid element in the app. Is there a way of synchronising tools with the app one it's loaded from VS? Maybe I should be using some kind of Edge/Canary preview?
On a separate note, is MS creating a clean hybrid...
Read lessI ran the bits for Blazor Hybrid (.NET 7 and the latest VS 17.4) and am planning to stylise the CSS using DevTools. I press CTL+SHFT+I and DevTools opens. I can pick my way thro’ the HTML and CSS, but I can’t seem to get the tools to jump to the right place when I highlight or click on a Blazor Hybrid element in the app. Is there a way of synchronising tools with the app one it’s loaded from VS? Maybe I should be using some kind of Edge/Canary preview?
On a separate note, is MS creating a clean hybrid project template or is the idea dead?
Many thanks.
Daniel Roth Read moreI can’t seem to get the tools to jump to the right place when I highlight or click on a Blazor Hybrid element in the app
If you select the browser dev tools and type Ctrl-Shift-C you should then be able to hover over and select UI elements in the app and the dev tools will show the corresponding HTML.
is MS creating a clean hybrid project template or is the idea dead?
Clean in what sense? Is there a GitHub issue tracking this request that you can link me to?
Read lessI can’t seem to get the tools to jump to the right place when I highlight or click on a Blazor Hybrid element in the app
If you select the browser dev tools and type Ctrl-Shift-C you should then be able to hover over and select UI elements in the app and the dev tools will show the corresponding HTML.
is MS creating a clean hybrid project template or is the idea dead?
Clean in what sense? Is there a GitHub issue tracking this request that you can link me to?
Rod Macdonald· Edited Read moreHi Daniel, thank you for your very prompt response, much appreciated.
Ah, I can finally see this! Both Ctrl+Shft+I and Ctrl+Shft+C are needed, the latter key-set is acting like 'inspect' on Edge's browser context menu, nice!
Apologies for the poor jargon, should have said 'empty' rather than 'clean'. You mentioned the potential feature in a response to my query 1st August (think that was about preview 6) as this was something you were discussing with your colleagues on GitHub: https://github.com/dotnet/maui/issues/9126 - I see there has been further discussion so maybe it's a feature for .NET 8?
Read lessHi Daniel, thank you for your very prompt response, much appreciated.
Ah, I can finally see this! Both Ctrl+Shft+I and Ctrl+Shft+C are needed, the latter key-set is acting like ‘inspect’ on Edge’s browser context menu, nice!
Apologies for the poor jargon, should have said ’empty’ rather than ‘clean’. You mentioned the potential feature in a response to my query 1st August (think that was about preview 6) as this was something you were discussing with your colleagues on GitHub:https://github.com/dotnet/maui/issues/9126 – I see there has been further discussion so maybe it’s a feature for .NET 8?
Daniel Roth Yup, we’ll look at adding an empty .NET MAUI Blazor template for .NET 8. Please give the corresponding GitHub issue a 👍 so we know it’s important to you!
Rod Macdonald Hi Daniel, I think I can’t because I previously thumbs’upped in August – but anything I can do to bolster UI development is a must (I even previously asked the XAML team to redesign XAML based on ’embracing and extending’ HTML (one UI stack to rule them all), but hey! R
倉庫 煉 I would like to see something done about the fact that if the Windows account name is mixed with Japanese, the characters are garbled when accessing the temporary file at the time of asp.net issuance and cannot be issued. (deepl translation, Japanese to English)
Steve Wasielewski· Edited Is there a doc out there for Migrating from Blazor Server 6.0 to Blazor WASM 7.0?
Thanks
Daniel Roth Read moreHi Steve. Great question. I don't think we've formally documented how to switch between Blazor Server and Blazor WebAssembly, but it should be reasonably straightforward. You can create a new Blazor WebAssembly app to see the key pieces needed to setup the app. You can also start by moving your Blazor components out of the Blazor Server project into a Razor Class Library so that they can be reused with any Blazor hosting model. You'll need to check your component implementations to make sure that they aren't implemented in a way that is coupled to the server environment. With a...
Read lessHi Steve. Great question. I don’t think we’ve formally documented how to switch between Blazor Server and Blazor WebAssembly, but it should be reasonably straightforward. You can create a new Blazor WebAssembly app to see the key pieces needed to setup the app. You can also start by moving your Blazor components out of the Blazor Server project into a Razor Class Library so that they can be reused with any Blazor hosting model. You’ll need to check your component implementations to make sure that they aren’t implemented in a way that is coupled to the server environment. With a Blazor WebAssembly app, any interactions with the server will need to happen over the network. You can often abstract away these interactions with a service interface that you make available through dependency injection. I hope this helps!
Steve Wasielewski Can you use Windows AD with Blazor WASM?
Steve Wasielewski Read moreRight now, I'm trying to switch to Server to Wasm in .net core 6.
Am getting the following error now:
Severity Code Description Project File Line Suppression State
Error NETSDK1082 There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'. Internal.App C:\Program Files\dotnet\sdk\6.0.403\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets 430We have this app using a minimal Api already, so that shouldn't be an issue. I did create a regular WASM app and I think I have everything about the...
Read lessRight now, I’m trying to switch to Server to Wasm in .net core 6.
Am getting the following error now:
Severity Code Description Project File Line Suppression State
Error NETSDK1082 There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier ‘browser-wasm’. Internal.App C:\Program Files\dotnet\sdk\6.0.403\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets 430We have this app using a minimal Api already, so that shouldn’t be an issue. I did create a regular WASM app and I think I have everything about the same between the 2 solutions, but I still get that error above?
Daniel Roth Hi Steve. Check your Blazor WebAssembly project file and make sure the SDK is set to Microsoft.NET.Sdk.BlazorWebAssembly instead of Microsoft.NET.Sdk.Web.
Steve Wasielewski I have things compiling, but now there is a blank page!
Steve Wasielewski· Edited Read morep>Here is what my project file look like:
<code>
<ItemGroup>
<PackageReference Include="FluentValidation" Version="11.4.0" />
<PackageReference Include="LMCU.APSComponents" Version="1.1.8" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.11" />
<PackageReference Include="MudBlazor" Version="6.0.10" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="7.0.0" />
</ItemGroup><ItemGroup>
<ProjectReference Include="..\Internal.Bll\Internal.Bll.csproj" />
<ProjectReference Include="..\Internal.Domain\Internal.Domain.csproj" />
<ProjectReference Include="..\Internal.Utils\Internal.Utils.csproj" />
</ItemGroup>and still get this error: There...
Read lessp>Here is what my project file look like:
net6.0 enable enable
<ItemGroup>
<PackageReference Include=”FluentValidation” Version=”11.4.0″ />
<PackageReference Include=”LMCU.APSComponents” Version=”1.1.8″ />
<PackageReference Include=”Microsoft.AspNetCore.Components.WebAssembly” Version=”6.0.11″ />
<PackageReference Include=”Microsoft.AspNetCore.Components.WebAssembly.DevServer” Version=”6.0.11″ />
<PackageReference Include=”MudBlazor” Version=”6.0.10″ />
<PackageReference Include=”Serilog.Settings.Configuration” Version=”3.4.0″ />
<PackageReference Include=”Serilog.Sinks.File” Version=”5.0.0″ />
<PackageReference Include=”System.Configuration.ConfigurationManager” Version=”7.0.0″ />
</ItemGroup><ItemGroup>
<ProjectReference Include=”..\Internal.Bll\Internal.Bll.csproj” />
<ProjectReference Include=”..\Internal.Domain\Internal.Domain.csproj” />
<ProjectReference Include=”..\Internal.Utils\Internal.Utils.csproj” />
</ItemGroup>and still get this error: There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier ‘browser-wasm
Nemo Please consider building and releasing first party controls for Blazor. I have been using Blazor for the past couple years and has been great, only thing holding it back is the lack of feature rich controls and the need to rely on 3-rd party vendors to fill the gaps. If Microsoft can build a set of standard controls and some high performance controls such as AG Grid for Blazor it would remove one of the major road blocks for wide spread adoption. Thanks.
Daniel Roth Hi Nemo. Thanks for sharing this feedback! If there are specific components you’d like to see included in the Blazor framework please let us know by creating issues on GitHub:https://github.com/dotnet/aspnetcore/issues/new. We do now have a preview of a basic grid component for Blazor:https://aka.ms/blazor/quickgrid. There are lots of great open source Blazor component libraries that you can try out as well, many of which are listed athttps://aka.ms/awesome-blazor.
Harold Ricker I’ve started to do more development in WSL with Ubuntu, I would like to know peoples thoughts about installing DotNet through the Ubuntu package manager rather than in the Windows environment on the computer.
Николай Михеев Hooray! ☺️
And I’m waiting for when it will be possible to receive Blazor connection parameters, in the form of IP, and so on.
The conditional HttpContext of the BlazorHub connection.
And to be able to disconnect it from the server side.
Is there no such possibility?Now all there is is a Circuit where there is only an ID, which gives nothing.
Jorge Morales Vidal Great job guys! One thing: The link for the Azure Static Web Apps redirects to Bing, looks like it’s broken.
David Taylor Read moreDan, unfortunately I think the new @bind:after blazor feature is broken in the RTM release. I just created an issue on gibhub:
https://github.com/dotnet/aspnetcore/issues/44957
Then I noticed the github issue created before mine appears to be related (where they upgraded from a .NET 7 RC version to RTM and the same issue appeared).
It would be great if someone from the team could quickly review and if needed get a patch out for the RTM release given this is all being discussed at .NET Conf right now (it will be confusing if people try this... and they will probably think...Read lessDan, unfortunately I think the new @bind:after blazor feature is broken in the RTM release. I just created an issue on gibhub:
https://github.com/dotnet/aspnetcore/issues/44957
Then I noticed the github issue created before mine appears to be related (where they upgraded from a .NET 7 RC version to RTM and the same issue appeared).
It would be great if someone from the team could quickly review and if needed get a patch out for the RTM release given this is all being discussed at .NET Conf right now (it will be confusing if people try this… and they will probably think they are doing something wrong themself).