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
2
votes
0 answers
Polymorphic data in dotnet 7 configuration
I want to load polymorphic data from appsettings. This is a test setup.
async Task Main()
{
var cfg = new
{
PolySection = new PolyCfg
{
Property = new List
{
new…

ZorgoZ
- 2,974
- 1
- 12
- 34
2
votes
0 answers
CookiePolicyOptions in ASP.NET 7
I'm writing my first ASP.NET 7 app and I'm confused about how cookies are set up. I've read various blogs and tutorials and have gleaned the following information:
Configure the cookie policy and authentication in Program.cs like…

Germgh0st
- 41
- 3
2
votes
1 answer
Polymorphic serialization for every child class in .NET 7 using System.Text.Json
In .NET 7, we can use JsonDerivedType to enable polymorphic serialization for a type:
[JsonDerivedType(typeof(ChildClass))]
public class BaseClass
{
public string FirstName { get; set; }
}
public class ChildClass : BaseClass
{
public string…

user246392
- 2,661
- 11
- 54
- 96
2
votes
1 answer
Blazor EventCallback return value to the child component [server-blazor]
I have a need to adjust a child component based on the result of EventCallback async call, starting with reporting an error in validation summary. Yet I cannot seem to find a blazor-way to do this efficiently, it seems that communication is…

mmix
- 6,057
- 3
- 39
- 65
2
votes
1 answer
Possible to ship my application with a local copy of the .NET 7 runtime?
Having a set of multiple .NET 7 applications (Console and WinForms) that all sit in the same folder of a product of mine, I try to find a way to deploy it.
Ideally I do not want the .NET 7 Desktop runtime to be installed as a prerequisite condition.…

Uwe Keim
- 39,551
- 56
- 175
- 291
2
votes
1 answer
AlarmManager Scheduled Task Android Maui
I'm trying to make alarm program, that will start a page when it goes of. Main problem here is that it is not trowing an error but method OnRecieve() of AlarmReciever class is not starting in time. Also i dunno how to check whether pendingIntent is…

Pavlo Horvat
- 33
- 4
2
votes
1 answer
Scrutor not working to automatically register the services with the ASP.NET Core DI container in case of .NET 7 application
I have created a .NET 7 Web API project using the following links…

santosh kumar patro
- 7,231
- 22
- 71
- 143
2
votes
1 answer
In .NET 7 / EF Core 7, can value conversions reference other properties of the same entity?
I am trying to convert a field on way in from the database, and also on its way out to the database. The tricky part is, I would like to use data from one column to affect data in a different column.
This has worked for me successfully when I…

Christopher Seigel
- 23
- 4
2
votes
1 answer
.NET 7 API catch-all route without breaking static files
We are using attribute routing in a .NET 7 API project. In the startup we call UseStaticFiles() before calling MapController(). Something like this:
app
.UseDefaultFiles()
.UseStaticFiles()
.MapControllers();
app.Run();
We are trying to…

PaulVrugt
- 1,682
- 2
- 17
- 40
2
votes
0 answers
Binding Navigator Visual Studio 2022 .NET 7
Binding Navigator control do not apear in toolbox on VisualStudio 2022, i try to add control manualy adding the dll, but do not work, is the control deprecated?

Christian Juarez
- 31
- 3
2
votes
1 answer
Setting up DbContext in Persistence project causing error .NET 7
I have a Persistence project which includes my ApplicationDbContext class and it is this project where I want my migrations to be created.
Persistence.Context.DbContext
public class PizzaDeliveryDbContext : DbContext
{
private readonly…

J Moss
- 205
- 1
- 5
- 13
2
votes
2 answers
suggest using webapplicationbuilder.configuration instead of configureappconfiguration
I am trying to read value from appsettings.Development.json file using Managed Identity for.NET 7 asp.net core web api application using Visual Studio 2022 (Enterprise Edition)
Here goes the code for Program.cs :
var builder =…

santosh kumar patro
- 7,231
- 22
- 71
- 143
2
votes
0 answers
NET 7 published single file not running after port from NET Framework 4.6
i created a little winforms app some years ago with the NET framework 4.6 that now needed some rework. I had to decompile it with jetbeans dotpeak as the source code got lost over the years (what worked very well) and ported it to NET 7 (what also…

MrCoffeeeeee
- 31
- 3
2
votes
1 answer
Docker for net7 worker service running in linux container fails
I have a net7 worker service, which works as expected with the default implementation from the template.
I want this service to run a job, and do somethin in a sql server database. This is another library and when running the workerservice on my…
user21607485
2
votes
0 answers
Can Xamarin Profiler work with .net 6+ apps
I've been attempting to use the Xamarin Profiler on .net 7 iOS and Android Xamarin projects unsuccessfully both on Visual Studio Mac (with enterprise license) and Visual Studio Enterprise 2022. In both environments and with both projects the Xamarin…

Magnetic Llama
- 154
- 2
- 11