Category "c++sharp"

Delaying a task for a very very long time

If we delay a Task using the Task.Delay method for a very long time, let's say 6 months, and if we assume that the OS does not shutdown or restart during this p

Entity Framework Core too slow on First call

I have around 40 entities and everytime after I compile and run my app it takes almost 10 seconds whenever DbContext is called for the first time. Is there a wa

How to disable tracking changes within editor of Rider?

When Rider detects you are using some version control it will show for example gray triangles next to line numbers in places when some code was removed (within

Deploying a C# source generator project that includes references to other private projects

I want to release a source generator package, and I want to include a private project dependency on the source generator project. For example, assume that my pr

Unity C# error: (12,47): error CS1503: Argument 2: cannot convert from 'System.Collections.Generic.List<UnityEngine.GameObject>' to 'float'

I'm new to programming in general. With another Script i store in the list "spawnPointC" all gameobjects called spawnPointC that appear from spawning other pref

WebBrowser Control with Google 2-Step Verification

We have a class library that uses the .NET WebBrowser control to authorize access to a third-party API, either with that third-party's oAuth2 Authorization flow

403 Forbidden Error in Keycloak API (view-users)

I'm having issues trying to access auth/admin/realms/{realm-name}/users API. I've already tried everything from other questions and answers, but nothing seems t

Using ML.net with an ONNX model and GPU

How do you get Microsof.tML to run on an NVDIA GPU using C#? I followed the instructions https://github.com/dotnet/machinelearning/blob/master/docs/api-referen

How can we pass url parameter to rdl file?

I have a requirement to show the static text of my report in different language. Steps that I am following: Create a url with query string parameter with Cultu

How to use custom filter in Minimal Api .net 6.0?

After decoding the token generated in another application, I need to check for an expire. I used OnActionExecuting in web app but not working this method in min

How to read an excel file stored in Azure Storage as a Blob File

I want to read an excel file stored in an Azure Storage container as a Blob using Epplus package in C#. I have tried to do something with this code. string uri

Logging errors by serilog-timings at loglevel "Error"

I show my idea on the serilog-timing example. public static void Main(string[] args) { Log.Logger = new LoggerConfiguration() .Enrich.FromLogContext

Entity Framework Core 5 and CosmosDB SQL API - Include extension method does not work

I have followed the steps from the following EF Core 5 site in order to store and read items from the CosmosDB. Here is the site: https://www.learnentityframewo

Move multiple mails to a folder in a different store

I'm using Outlook Redemption library (http://www.dimastr.com/redemption/home.htm) for my Outlook AddIn. I want to move multiple mails from an exchange account t

ASP.NET Exception Error From SQL Server Windows Authentication Login

I have read and tried all the suggestions from [https://stackoverflow.com/questions/22415319/system-data-sqlclient-sqlexception-login-failed-for-user][3] But no

Unity "Multiple precompiled assemblies with the same name" using external dll

I have a "Shared" project where I share code between my client (unity) and my server (C# server) Both projects require Newtonsoft.Json.dll When I compile the Sh

Detecting navigation events blazor webassembly [closed]

How can I detect when URL is changed? I need the event (URL change event) to perform some specific action based on the URL.

In Blazor, how can I dynamically change an HTML tag?

Let's say I have the following markup in my Blazor component: <div @attributes=Attributes data-myattr="something"> @ChildContent </div> I'd lik

EFCore join values

I'm trying to join a big table to a small list of data pairs using EFCore 2.1.1. I want this join to happen server-side, rather than trying to download the who

How to change whole solution's project's name in Visual Studio?

I have ASP.NET CORE C# project. I want to change my solution name and whole project's name. For Example : OldSolution.OldName // this is Solution OldSoluti