.net-8.0 Questions

2

Solved

I have this bit of code and when running in .NET 4.8 gives a different result than .NET 8 var cultureInfo = CultureInfo.CreateSpecificCulture("ar-KW"); var date = new DateTime(202...
Disenthrall asked 14/10 at 5:41

3

I'm working on a Blazor 8 application and I'm having trouble with browser caching of my static files. When I make changes to the CSS files, the changes are not immediately visible because the brows...
Stalky asked 30/11, 2023 at 9:23

1

Solved

In C# 12 there's the "Collection initialization can be simplified" analyser IDE0028. I've been wondering how the fixer decides when to fix or not fix initialisers such as new(), new List&...
Hentrich asked 10/9 at 5:13

3

Solved

Why can i pass an array to method accepting IList resulting in getting error when trying to use this interface (array does not support Add() obviously) using System.Collections.Generic; pub...
Animalcule asked 3/9 at 8:53

1

I can't figure out how to share my service registrations between my test code that uses Orleans and the test code that is outside of Orleans. I've spent days trying to figure this out. My unit test...
Lutist asked 4/12, 2023 at 20:21

3

I've been experimenting with Blazor in .NET 8 and I'm trying to understand how the Auto-render mode works. From what I've learned, Blazor initially uses a WebSocket connection in Auto mode to provi...
Pokpoke asked 17/11, 2023 at 16:41

3

I created a blank webapi project for .NET8,Install two packages Microsoft.Extensions.DependencyModel and Microsoft.Data.SqlClient. The following is the source code: using Microsoft.Extensions.Depen...
Toque asked 30/11, 2023 at 3:45

2

Solved

I have a .NET 6 WPF project and cannot figure out what changed as the ProductVersion of my assembly suddenly contains a git commit hash. My project file always looked like this, where I also update...
Xenophobe asked 6/9, 2023 at 9:48

1

I got a gRPC service implemented using C# .NET8. I'm setting a concurrency limiter like this: services.AddRateLimiter(options => { options.AddConcurrencyLimiter(policyName: concurrencyPolicyNa...
Pent asked 16/7 at 10:52

2

@page "/fileup" <h3>FileUp</h3> <InputFile OnChange="@UploadedExcel" accept=".xlsx" /> @code { public async Task UploadedExcel(InputFileChangeEventA...
Graniteware asked 28/1 at 13:1

2

Solved

I ran into some strange behaviour with the authorization in Blazor with .NET 8. The sample is a slightly modified version of the Blazor Web App template with its default settings (no authorization)...
Myrna asked 20/12, 2023 at 17:58

4

Solved

In the logs of a ASP.NET 8 container I find this entry [22:38:50 WRN] Overriding HTTP_PORTS '8080' and HTTPS_PORTS ''. Binding to values defined by URLS instead 'http://+:80'. # {"EventId&quot...
Headspring asked 17/6, 2023 at 23:31

2

Before keyed services were introduced in .NET 8 you could retrieve all of the instances of a class or interface with IEnumerable<MyType> myTypes like so: Program.cs builder.Services.AddSingle...
Clarke asked 30/11, 2023 at 11:51

3

Solved

Before .NET 8, hosting server side controllers with a Blazor WebAssembly app was easy. You just clicked the "ASP.NET Core Hosted" checkbox in the project template, and an ASP.NET Core pro...
Roa asked 15/11, 2023 at 9:26

9

Solved

I opened my Visual Studio 2022 project this morning and cannot get it to run any more due to the following error: CS9057 The analyzer assembly 'C:\Program Files\dotnet\sdk\8.0.100-preview.6.23330....
Kappenne asked 21/7, 2023 at 20:6

4

Solved

Edit: Code Repo here. Also I'm aware that I can simply add .DisableAntiforgery(); to my API endpoint as explained here to make it work, but I'd like to do this the proper way. I'm trying to upload...
Hornmad asked 27/9, 2023 at 18:22

3

I tried to convert my Blazor project from NET7 to NET8 because I'm facing some issues with the integrity check. I installed NET8 RC and Visual Studio 17.8 Preview. My solution consists of the serve...
Heated asked 1/10, 2023 at 10:53

4

I am used to registering the httpclient in the program.cs of the client project as follows builder.Services.AddHttpClient("My.ServerAPI", client => client.BaseAddress = new Uri(builder...
Joselynjoseph asked 29/11, 2023 at 11:35

3

of course I decided to update from .net7 to .net 8 on this, the first day of the release. I am getting the errors below. My google-foo has not been very good. any ideas are appreciated? TIA Error C...
Cockcroft asked 14/11, 2023 at 21:44

2

I am facing problems while I am trying to database migration in .NET 8 and EF Core 8. I get this error: Method not found: 'Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping Microsoft.Enti...
Stretcher asked 16/11, 2023 at 3:4

1

Solved

Using System.Text.Json, is it possible to serialise an array such that each array item appears on a new line but each line is minified? Here is my console app attempting to use Utf8JsonWriter to wr...
Overtake asked 20/5 at 15:15

2

Solved

I was experimenting some stuff with the Span<T> type. My goal was to make an extension method to enumerate the splitting of a ReadOnlySpan<char>, to be used as follow : var x = "fo...
Gagger asked 14/5 at 13:26

2

In .net 8 i understand that .MapIdentityApi and .AddIdentityApiEndpoints are added. The issue is that they add a bunch of things i don't want. For example you are not allowed to register, only admi...
Aga asked 7/12, 2023 at 11:26

3

I'm working on converting a web application that runs on ASP.NET MVC on .NET framework to run on .NET 8. I see that no OWIN StartUp.cs class is created by default. Is this just a convention, or doe...
Yaws asked 14/12, 2023 at 18:34

2

Solved

In Blazor Server in .net 7 I can do this in a Page.blazor: @message <button class="btn btn-primary mt-2 btn-block" @onclick="SendMessage">Send Message</button> @co...
Impetuous asked 22/11, 2023 at 7:26

© 2022 - 2024 — McMap. All rights reserved.