Category ".net-6.0"

Could not load file or assembly 'Microsoft.Data.SqlClient' in .NET 6

I have developed a WPF app on .NET 5 (CRUD operations with Entity Framework Core). MSI packages are built with Wix toolset. Up to here everything works. I am cu

Open type font collections are causing errors with PdfPrintingCore "Font has no usable platform or encoding ID. It cannot be used with PDFEdit."

When printing any text in font type Cambria (or another .ttc font type) on Windows I get the following error message: Font has no usable platform or encoding ID

How can I generate .csproj Project file only in C# Console App?

I already have a Program.cs in the folder/directory and no other files. When I do dotnet new console, it won't let me create it unless I use --force to overwrit

How can I generate .csproj Project file only in C# Console App?

I already have a Program.cs in the folder/directory and no other files. When I do dotnet new console, it won't let me create it unless I use --force to overwrit

.NET 6.0 Blazor Server app: WebSocket connection to 'ws://localhost:60908/BlazorApp1/' failed

When I create a new, clean Blazor .NET 6.0 app and start it (using Visual Studio 2022), I see the following error in the browser console: WebSocket connection t

AutoMapper 11. Missing API replacements

28.2 ForAllMaps, ForAllPropertyMaps, Advanced and other “missing” APIs Some APIs were hidden for normal usage. To light them up, you need to add

.NET Core: Event handling at calling a third party 32-bit dll from a 64-bit c#

I'm going to migrate a .NET Framework 4.* application to .NET 6. Main application is compiled as 64bit and I need to use a 32bit (.NET 6) dll hosted as out-of-p

Visual Studio 2019 & 2022 (Preview) not finding .NET 6 SDK on launch - mac osx

I'm trying to run a C# .NET Core project locally on Mac and encountering some issues both on Visual Studio 2019 and 2022. Firstly, every time on loading up the

Breakpoints is not hitting while debugging a .NET MAUI android application

I have been working on a MAUI android application and when debugging, the breakpoints is not hitting and the application enter in a break state. But for windows

Can I programmatically attach a running .NET 6 process to a running instance of Visual Studio debugger?

I'm debugging an IPC logic where one .NET 6 processes is launching another, and I can't get to debug both within the same Visual Studio 2022 instance. When the

SettingsPropertyValue in ConfigurationManager won't serialize array of strings

I'm transferring an application from .Net Framework 4.6.2 to .NET 6 and I'm getting some problems with the ConfigurationManger where it is not able to serialize

EF Core - Unable to resolve service for type DbContext while attempting to activate ApplicationContext

I am attempting to scaffold CRUD razor pages using entity framework but the code generator throws the following error: There was an error running the selected

NET6 Linux-x64 Self-Contained Single-File Unusable

I've a project that runs perfectly as "Framework-Dependent Single-File" on Linux-x64, and also as a "Self-Contained" application. But when I compile as "Self-Co

Identity Server 4 connect/token works when self hosted but not when deployed

I built an .NET Core 3.1 IdentityServer4 to protect some API endpoints: public static class Config { public static IConfiguration Configuration { get; }

Get the raw request that is sent with HttpClient and HttpRequestMessage

In my C# code running .NET 6 (Azure Function) I am sending an HttpRequestMessage using HttpClient. It doesn't work but it should work, so I want to get the raw

Razor Pages Cannot Read File with build action "Content" Properties

I have a resources file name "Index.en-US.resx", initially it was "embedded resources" build action and it worked well in localization. But when it is "embedded

Oracle sequence EF Core 6.0?

I need to get a NEXTVAL from a SEQUENCE in an Oracle database. The modelbuilder does have a builder.HasSequence("TABLE_SEQ"); But I have no clue on how to use

Link the selected item of drop down list to sql script with an on change event

I have been battling this for some time now without success. So Your help is extremely appreciated. I have created a dropdown list from sql database. What I wan

How to correctly update database when users session expires for ASP.NET web application using the new .NET 6 format?

When a users session expires I want to update the database to switch their status to offline but I cannot find the right way to do this as I know that they can

Comparing two objects with == operator

I have this code that checks the references of two variables, I came across this case which is a bit confusing : string first = "10"; object second = 10.ToStrin