Use this tag for questions specifically related to version 7.0 of the .NET platform. For questions on .NET Framework generally, use the .net tag.
Questions tagged [.net-7.0]
1169 questions
5
votes
2 answers
how can i update all my nuget dependencies at once using command line?
my projects has more than 400+ dependencies and I have to update all of them at once with command in .NET 7.0 .
I have try nukeeper,dotnet-outdated-tool and NuPu. nukeeper and dotnet- outdated is already deprecated and Nupu is used to update…

Rahul Dave
- 51
- 1
5
votes
2 answers
JSON Polymorphic serialization in .NET7 Web API
.NET7 Includes a lot of improvements for System.Text.Json serializer, one of which is polymorphic serialization of types using the new [JsonPolymorphic] attribute. I am trying to use it in my Asp.Net web API, however it doesn't seem to serialize the…

MarengoHue
- 1,789
- 13
- 34
5
votes
1 answer
C# 11 - What have we gained by adding IAdditionOperators to this method?
I just upgraded Visual Studio 2022 to .NET7, which includes C# 11. I am interested in trying out the new static abstract interface methods, and so followed the tutorial there.
The article shows how to define Point and Translation records that use…

Avrohom Yisroel
- 8,555
- 8
- 50
- 106
5
votes
1 answer
Linq method Sum not supported in .NET 7 generic math?
I have the following code, but it does not compile in Visual Studio 17.4 preview 2.1 and .NET 7 RC1 SDK:
using System.Numerics;
int averageInt = Average(1, 5, 10);
Console.WriteLine(averageInt);
double averageDouble = Average

Boris Eetgerink
- 63
- 7
5
votes
2 answers
Why am I getting warnings that analysers are not found?
I created a toy project for checking out the latest .NET 7 (preview-5) and the regex code generation. It worked great, so I applied the same changes to an existing project (not for production, but for personal productivity). For some reason, I’m…

Quirin F. Schroll
- 1,302
- 1
- 11
- 25
5
votes
0 answers
Another option for creating .NET 6 WinForms install?
I was planning to upgrade WinForms applications from .NET Framework to .NET 6, but unfortunately trimming is disabled for Windows Forms and WPF applications in .NET…

Dave Doknjas
- 6,394
- 1
- 15
- 28
4
votes
3 answers
Why does checking if a Type of System.Int32 is assignable to Type of INumber<> return false in a unit test?
This statement when run from a console application sets 'x' to true:
var x = 3.GetType().IsAssignableTo(typeof(INumber<>)); // x == true
The same statement when run inside a unit test sets x to false. Why?

rory.ap
- 34,009
- 10
- 83
- 174
4
votes
1 answer
What are the new "Order" and "OrderDescending" in .NET 7?
After a few months not working with LINQ, today I realized Intellisense gave me OrderDescending instead of OrderByDescending (due to my muscle memory). The documentation is not very clear on what it does or why I should use it instead of…

Luke Vo
- 17,859
- 21
- 105
- 181
4
votes
3 answers
Using a partitioner in C# to parallel query a REST-API with pagination
I was wondering if my approach is good to query a REST-API in parallel because there is a limit on how many results can be obtained with one request (1000). To speed up things I want to do this in parallel.
The idea is to use a partitioner to create…

Alexander Schmidt
- 41
- 2
4
votes
0 answers
Combining .net Maui WebView and other controlls on same Content Page
Trying to build a content Page with a WebView, DatePicker and button on the same content page. Any time I make the WebView Visible all the other controls become invisible. Have tried many variations but found this layout while googling. Worked for…

Scott Lohman
- 71
- 3
4
votes
1 answer
EF Core 7 no definition for ExecuteUpdateAsync
I have the following query in my project which is using Microsoft.EntityFrameworkCore 7.0.2:
await _context.Actions
.Where(a => a.DateCreated < DateTime.Today && a.ActionType == (int)ActionTypes.ScoredAction && !a.DateCompleted.HasValue)
…

Pete
- 57,112
- 28
- 117
- 166
4
votes
2 answers
What is the difference between bind:after and bind:set in Blazor 7?
Recently, in Blazor 7, a feature has been added to make it easier to bind and call the method based on changes in the bound expression.
In .NET 7, you can now easily run async logic after a binding event has completed using the new @bind:after…

Arani
- 891
- 7
- 18
4
votes
1 answer
.NET 7 Rate Limiting - Rate limit by Client
I have to implement rate limiting to public endpoints using .NET 7 new Rate limiting Middleware.
For now I've settled on a fixedWindow rate limiter.
I've found many different implementations online, but the only ones I found implementing any kind of…

Platypus
- 321
- 1
- 4
- 17
4
votes
3 answers
.NET 7 Distributed Transactions issues
I am developing small POC application to test .NET7 support for distributed transactions since this is pretty important aspect in our workflow.
So far I've been unable to make it work and I'm not sure why. It seems to me either some kind of bug in…

Bola
- 718
- 1
- 6
- 20
4
votes
1 answer
.NET 7 minimal API AsParametersAttribute not mapping my request model as expected
I am trying to implement a simple generic minimal API MediatR method mapper (inspired by this video).
I ran into an issue regarding mapping my request model when receiving data from body in the POST method with AsParametersAttribute.
I've double…

Jorvat
- 41
- 3