Category "c++sharp"

Using C# Moq testing getting Parameter count mismatch?

I know there are similar questions but somehow I am not able to figure out the situation in my case. I am getting Paramater count mismatch exception. Here is

CreateDbCommandDefinition in the custom DbProviderServices not called?

I need to intercept the call to the following method of DbProviderServices: DbCommandDefinition CreateDbCommandDefinition(DbProviderManifest providerManifest, D

Azure Kinect DK, Body tracking: Mapping separate avatars on separate skeletons

To recreate my issue, I've setup a project in Unity3d 2020, using this sample project. Here I can successfully map an avatar to a single skeleton. In my project

Redirect to Action not working using MVC asp.net

I have a requirement, where I validate user using Windows Authentication. Till there it works perfectly fine. But when I try to redirect to respective controlle

nanoFramework webserver not recognizing routes with attributes

I have set up an ESP32-WROVER as a web server using the nanoFramework.WebServer library. It fires the route method when I use a route without attributes (//192

ITrackingConsentFeature not working in production

I have a cookie consent banner in my blazor server app, everything works well when building in debug mode, but when I push it into production I get a "Object re

C#: Helper Method Dependency Injection within Constructor

I have a IData interface that handles the SQL data access logic and as well as retrieving data from SQL Server: public interface IData { Task<IEnumerable&l

Create UML Diagram from C# Project [closed]

I am currently working with a big Library that I did not write myself, there are close to no comments at all and there is no API. Therefore I

How to get Serilog to enrich logs

I've set Serilog to read its config from appsettings.json: return WebHost.CreateDefaultBuilder(args) .UseSerilog((ctx, config) => { config.ReadFrom.Confi

Error "Keyset does not exist" from creating a RSACryptoServiceProvider

My code csp = new RSACryptoServiceProvider(cspParms); causes the error: "Keyset does not exist". string keyContainerName = "abcd"; CspParameters cspParms = ne

WinUI Desktop app publish in app center: Problem occurred while extracting your app

I am trying to upload a WinUI desktop package in appcenter, but i am facing a below issue when uploading the packages. In addition, I have tried some other app

How to send Scorlllock key event using C#

I have two machines which use a KVM to share one mouse and keyboard. When switch to another machine, I have to press keys ScrollLock + ScrollLock + num. I'm try

C# MySQL SSL Connection Error when trying to use conn.Open()

For the past 3 days now I have been struggling with an issue with MySQL connector in C#. Basically, I follow the MySQLConnector tutorial to open my connection

How to use localization with data annotation in a separate DTO Assembly (Asp.net Core Web Api)

I have: a Dto.Library (.Net 5 Library) a SharedResourceLibrary with Resource.resx (.Net 5 Library) How can i use the Resource File Messages in conjunction with

How to send Scorlllock key event using C#

I have two machines which use a KVM to share one mouse and keyboard. When switch to another machine, I have to press keys ScrollLock + ScrollLock + num. I'm try

Dispose ReaderWriterLockSlim after ExitWriterLock

I have a function to clean up some objects as well as the ReaderWriterLockSlim. But I need the ReaderWriterLockSlim to lock as writer lock to prevent the other

ASP.Net core - blank response when returning a JObject property

I am using ASP.Net core 5.0 and want to return IEnumerable of an object as Action method response. Here is the response class: public class TestResponse { p

Unity Android App Bundle Builds sometimes have double size

We are using Google's App Delivery package in our game to escape APK download size limit. First a few builds were completely fine. But later, our download sizes

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.

Unity: Convert Vector2 to Vector2Int

I have a Vector2 and I want to convert it into a Vector2Int. I know I could convert the Vector2 with something like this: Vector2 v2 = new Vector2(10, 10); Vec