Category ".net"

How to use the Monaco editor inside a Windows Forms application?

I have a windows form app (.net framework) and I want to use Monaco editor inside it. Scouring the internet does the provide much help and stackoverflow does no

What is a NullReferenceException, and how do I fix it?

I have some code and when it executes, it throws a NullReferenceException, saying: Object reference not set to an instance of an object.

How to validate Azure Blob Storage Shared Access Signature (SAS) URL?

My application allows users to enter an Azure Blob Storage SAS URL. How would I go about validating it? I'm using the Azure Storage Blobs client library, and th

Registering Class Settings into Azure Function App via Dependency Injection

I'm in the process of upgrading one of our Azure Function Apps from .NET Core 3.1 to .NET 6. As a result, I need to implement dependency injection. Our project

Best practice to manage entities values and value changing events

Little introduction: we have a complex entity and overgrown business logic related to it. With various fields that we can change and fields that updates from ex

Is the async keyword required to create asynchronous functionality? Did this functionality change in the recent past?

I'm attempting to show that it is possible for my team to add asynchronous functionality to a currently "fully-syncrhonous" program. Are there any reasons, such

C# MongoDB Guid Array

I have a document that is represented using this class public class UnitDocument { [BsonConstructor] public UnitDocument(Guid id, string allocId, Guid[]

netFrameworkVersion in Azure App Services Api App

I'm configuring a api app in azure with bicep. This is a dotnet core 3.1 app. For netFrameworkVersion i provide 'v3.1', this however doesn't work. The deploymen

C# WPF window resize is blocking NAudio WaveIn / WaveOut stream

I´m using NAudio and WPF to develop a mixer software in C#. But I have faced with a non commum behaivour: the output is playing normally, but when I resiz

.NET Azure sdk resource manager - NuGet package: Stable release

I'm planning to handle some Azure ARM code in .NET 6 and want to use Azure libraries. I found that there are 2 NuGet packages (old and new) available: Microsoft

*Edit* Service Fabric - Can't Debug With .NET 6

Now that I have figured out what is going on (can't debug services using .NET 6 in Service Fabric), does anyone have an idea of how to get this to work? Some se

Understanding liquid template in microsoft FHIR-Converter

I am trying to understand how liquid template is being used in the Microsoft FHIR-Converter: https://github.com/microsoft/FHIR-Converter/tree/9239c4183fafcc67fe

How to use linq2db to insert sql geography?

It is simple really: var a = SqlGeography.STGeomFromText(new SqlChars("POINT(-122.34900 47.65100)"), 4326);` and then insert await _geoDb.Table.Value(x => x

.NET 6 obfuscation

I'm trying to obfuscate an .exe file obtained after compiling my .NET 6 project with the "Produce a single file" option, the problem is that no obfuscator works

Failed to setup dotNet certificate on mac by all means

I am trying to run the Dotnet version 6 app on macOS latest version I searched everywhere, it was always required to install the certificate although I had a va

grab UserSecrets from a NuGet package

I've written a C# class library for my company to use internally, and it uses DotNet UserSecrets to allow each developer to have their own credentials set witho

What is the data type in ASP.NET Core for decimal(18,2) in sql

I have a Amount column in database which is in Varchar datatype, I am retrieving the data from table and I am casting for the amount should be returned as (123

Visual studio 2022 .net 6 is not supporting reportviewer?

In Visual Studio 2022 I can't get any report viewer, and I am using .NET6 framework. Is there any way to still somehow use it?

Change Feed Processor Issue

I am trying to test change feed processor in .net. I have tried to use the change feed processor from the beginning (as mentioned in documentation). When I star

Could not load file or assembly 'NLog.Web.AspNetCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c'

I'm upgrading my solution from .NET 5 to .NET 6 and getting the error at runtime Unhandled exception. System.IO.FileNotFoundException: Could not load file or a