Category ".net-6.0"

How to use xUnit for MAUI projects for platform specific code?

I am having MAUI project and platform specific code for Android and Windows. When I reference the MAUI project to xUnit project in Visual Studio 2022 Preview, i

DateRange client side validation in ASP .NET6 using Fluent Validation

In my application I'm using a form to enter user information including birthdate. I want to perform both client-side and server-side validation and I'm using Fl

Queuing async tasks and passing back result to caller

In my app I have a single Client class responsible to do communication via TCP/IP and I have several async Processes posting "work" to the Client class. What I

dotnet restore in Github Actions gives 401 unauthorized

a NET6 project on Github cannot be dotnet-restored in Github Actions. dotnet restore works fine locally. Looking at the Action logs, it seems GH looks for Micro

External Provider Login .NET

I had follow this tutorial for setup External Login https://code-maze.com/external-identity-provider-aspnet-core-identity/, after when I want to test login with

AWS Credentials in a Docker Desktop deployment

I am working on a .net 6.0 application that will run in an EKS cluster, but I am developing using Docker Desktop and Kubernetes. Whilst I can pass in the AWS_AC

For MudBlazor component MudSelect, how do I get selected value to align in the center?

I have a very simple drop down, a MudSelect, which is working fine. When you list the choices they align fine in the middle, but I do not know how to get the s

ASP NET Core 6 MVC Slow page loading

I am trying to upgrade an old ASP .NET project from Framework 4.5 to Core .NET 6. Going well so far, but I noticed the page loading was way longer than before.

How do I set the default c# file in my Visual Studio Code c# Project?

I am new to using Visual Studio Code. I have always used Visual Studio IDE in Windows. I am trying to run a simple Hello World Program on Mac with VS Code. I ra

The framework 'Microsoft.WindowsDesktop.App', version '6.0.0' (x64) was not found in docker image

I have created a webapi project in dot net 6.0, which internally uses some winform code. I want to create a docker image however it is throwing the following er

.Net standard project docker COPY file not found visual studio

I have a .Net standard project called PrivateSales with a Dockerfile that looks like this #See https://aka.ms/containerfastmode to understand how Visual Stu

Update to .NET Core 6.0 in JetBrains Rider

A teammate recently updated our code base to use .NET Core 6.0 and I'm trying to build the project in JetBrains Rider. I went to File > Preferences > Envi

How to create a Logger in .NET 6 Program.cs

I have a Data.Migrations project, which will run any Entity Framework Migrations to update the database model. Recently I have updated this project to .NET 6 an

Identity MVC Project in .NET 5 upgraded to .NET 6 cannot find Views when deployed to AKS Cluster (Linux)

I am working on upgrading my .NET Identity project from .NET 5 to .NET 6. Currently, everything works flawlessly while the project is in .NET 5 but as soon as I

.net 6 core mvc return view() static file path gets the view path error : net::ERR_ABORTED 404

There is a problem with .net 6 core mvc when invoking a method of controller by (asp-controller ="test" asp-action="GetTest") static files such as js, css, medi

How is Windows Authentication Wired Up?

I'm in the process of creating an ASPNET Core 6 MVC app in VS 2022 which will eventually be deployed in a Docker container. Windows Authentication will be used

.NET 6 console app using NuGet library written for .NET 5 runs fine under Windows but crashes on Mac M1 with System.BadImageFormatException

Under Windows I have used the SaxonCS library (available on NuGet https://www.nuget.org/packages/SaxonCS/ that is written against .NET 5 successfully in both .N

Can't cast database type character to Guid

I updated my solution from .Net 3.1 to .Net 6. Also updated the Npgsql nuget package from 5.0.10 to 6.0.4 as part of this upgrade. Since then, I am receiving an

Custom authorization issue

I'm testing some custom authorization without the default Entity Framework stuff. I have created an "ASP.NET Core Web App (Model-View-Controller)" project using

In Visual Studio 2022, publish to IIS returns a build error, but publish to Folder is ok (and it was all working fine before)

I've updated Visual Studio 2022 to 17.1.0 recently and I now have this weird error, but not on every project (on only one up to now). I've tested other project