Category "c++sharp"

Importing exported project templates in Visual studio does not restore packages

I created an project template according to microsofts docs. The project itself requires 3 packages that I installed from Nuget. However upon importing the proje

How can I avoid TimeOut exception using Entity Framework with a stored procedure?

I'm using Entity Framework to call a stored procedure which takes 2 minutes to execute. As a result, I get a timeout exception. Is there any way I can use my

Creating a tree from a collection List<T>

In order to create a tree, I use the following code. var db = _context.GetContext(); var accounts = await db .Set<TradingAccount>()

Why does my visual studio closes automatically without any errors

it is the latest version of visual studio pro 2019 and there is new folder on my desktop named .vs and the desktop folder contains a folder named v16 and it c

Query by an element of an array of objects using C# driver

I have objects like this sample in my database: { "_id" : ObjectId("62623cd94c111e4e73c98e88"), "CDate" : null, "CUser" : "dexadminserver",

Query by an element of an array of objects using C# driver

I have objects like this sample in my database: { "_id" : ObjectId("62623cd94c111e4e73c98e88"), "CDate" : null, "CUser" : "dexadminserver",

Microsoft.Extensions.Logging custom implementation, how to get the caller method name?

I'm in .NET 6, I implemented a custom ILogger<TService> (of Microsoft.Extensions.Logging). Usually, when I implement a logger, I also get the caller metho

Unauthorized when attempting to post tweet api v1 (C#)

Morning all, I've not posted on SO for quite some time, but I need to ask the question, I’ve spent a day and a half trying to get this to work - it’

Passing multiple parameters in c# windows phone app using Frame.Navigate(typeof(Page2))

I am creating a basic MCQ app where 2 MCQ's along with options are showed on a single page and the submit button shows the results on the second page in a textb

How to write Repository method for .ThenInclude in EF Core 2

I'm trying to write a repository method for Entity Framework Core 2.0 that can handle returning child collections of properties using .ThenInclude, but I'm havi

Akka.net restart actor system termination on node quarentined

We are developing a cluster with Akka.net v1.4.38 on we have seed nodes that communicate with a external system using Akka.IO.TCP, and multiple client nodes tha

Client is unauthorized to retrieve access tokens using this method Gmail API C#

I am getting the following error when i tried to authorize gmail api using service account "Client is unauthorized to retrieve access tokens using this meth

.Net Core unable to use Bitmap

I am working on a Web Service using .Net Core 2.1. I have a byte array containing all pixels values (in grey scale), a width, a height. I want to create a bitm

What are all the possible expression keys used in Outlook .find .restrict method?

I can't come across the full list anywhere, it makes life creating tools for outlook particularly painfull. I am creating series of tools in WPF integrating wi

What is the difference between Publish methods provided in the Visual Studio?

When I click on the Publish method following options show up: What is the significance of each method?

Unsubscribing from event when object is disposed

What I'm trying to figure out is how to declaratively avoid the Object reference not set to an instance of an object exception thrown when disposing of subscrip

Stop Parallel.ForEachAsync

In C#, I am interested in stopping a Parallel.ForEachAsync loop (considering the differences between Stop and Break); for Parallel.ForEach I can do the followin

Is there a way to dynamically change the text of a textBox in Visual Studio with C# so that the value is a sum of values from other textboxes?

I need to have a text box that dynamically changes as values in other text boxes are being changed, and the value (would be an integer converted to string) of t

Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk' specified could not be found

env: ➜ KBDCompileApp git:(dev) ✗ dotnet --info .NET Core SDK (reflecting any global.json): Version: 2.2.101 Commit: 236713b0b7 Runtime E

c# Process() does not run certain files when compiled in 32bit

This code works in a 64 Bit build but not in a 32 bit build. Is it possible to make it work in a 32 bit build? What am I doing wrong here? var p = new Process()