Category "c++sharp"

A LDAP recipient not being resolved correctly when calling Recipient.Resolve

I am developing an outlook Addin c# using outlook object model. My Addin code needs to resolve the recipient in order to act on it based on its resolved type (A

Trying to implement a type converter for CsvHelper has no effect

I am trying to globally register a CsvHelper type converter that handles the value NULL for a decimal?, but when I do the registration is ignored and the conver

Failed to load the hostfxr.dll after install net core

Anyone has this problem i change Pc and tried to install net core framework but vs code return this info when i tried to write dontet --info Failed to load th

How to deserialize interfaces with Newtonsoft Json.Net

I have this class hierarchy : public class ProxyBotsSnapshotLogEntryDetails : IBotsSnapshotLogEntryDetails { public ICollection<IBotSnapshot> Snapsho

.Net Core 2.1 - Cannot access a disposed object.Object name: 'IServiceProvider'

I just migrated .NET Core 2.0 to .NET Core 2.1. Everything went fine, but when I try to login now I get the folowing error: $exception {System.ObjectDispos

VSCode won't open console in an external window

I am a beginner in C# just recently learning it soon. Whenever I run my Project.cs file, it does not open in an external terminal despite the launch.json file h

Pad a struct so its size is a multiple of 16 bytes

I'm trying to have my C# struct match up some complex padding and packing rules. Fields should be aligned on 4 byte boundaries. The entire struct should be a mu

Azure Service Bus send message every other time

I've a c# dotnet webjob and a simple desktop app. Sending a message apperaes to work only every other time. serviceBusClient = new QueueClient(_conf

How to get ILoggerFactory in .net 6

In .Net5 ILoggerFactory is used as Configure function in Startup.cs as follows : public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILogger

.Net Framework 4.6.1 - Web API - HttpResponseMessage.Content is empty for StringContent

Content being returned by HttpMessageResponse is blank/empty after being explicitly set I have created a WebApi with the latest .net Framework 4.6.1 and am try

How to connect ngrok with bot emulator?

I have developed a chatbot in C# and hosted it on our local server. When I'm trying to connect it remotely with ngrok. I get below error: Failed to spawn ngrok

What is the encoding to read and write files with special characters such as en dash, left quotes, etc?

I'm reading csv files that contain special characters such as the long en dash –, left double quotes “, and right double quotes ” and I can't

Problem Changing the value of nested ValueObject using C# 10, .NET 6 and EF Core 6

My Aggregate is like this: public class Order : AggregateRoot { private readonly List<OrderItem> _items = new(); public DateTime Date { get; set;

C#: Save selected outlook message as eml file

I created an add-on for outlook using c#. It is proposed to connect to external Document Management System(DMS) and upload documents/emails into it. And now I w

dotnet run not working after update to dotnet 6

I updated yesterday from .Net 5 to .Net 6 and now my projects can't start with dotnet run. I then get the error: Building... warn: Microsoft.AspNetCore.Server.K

How to hydrate a Dictionary with the results of async calls?

Suppose I have code that looks like this: public async Task<string> DoSomethingReturnString(int n) { ... } int[] numbers = new int[] { 1, 2 , 3}; Suppo

Entity Framework Core: load related data after object is queried

It is clear how to query an entity and include all the related data; e.g.: using (var context = new BloggingContext()) { var blogs = context.Blogs .

Build error: Reference PresentationCore could not be resolved

I have a WPF C# application hosted on GitHub attached to Travis. I configured my .travis-ci.yml this way: language: csharp solution: FaceDetection/FaceDetectio

LINQ query with multiple LEFT JOIN

I have 1 main table and 3 tables for ordering the fields in the main table. I return all these tables as lists. The main table structure is like this: Color Ma

UWP is binded checkbox is checked?

So I created a combobox with inside a few binded checkboxes. My xaml looks like this: <ComboBox x:Name="CbSandwichFilling" ItemsSource="{x:Bind SandwichFill