Category "c++sharp"

Restart c# console app after executing succesfull

How to automatically restart c# console application after a succesfull run? My program should be running continuously. And i should be like a loop but not in th

Adding Global Using Directive in blazor

The type or namespace name 'XXX' does not exist in the namespace 'MyClassLibrary.Models' (are you missing an assembly reference?). The error refer to this Blaz

C# How to set Property with two arguments

I need to setup a Property with two arguments, for example, to append text in a log file. Example: public string LogText(string text, bool Overwrite) { get

How to solved gRPC exeption with this Status(StatusCode="Unimplemented", Detail="Service is unimplemented.")?

I implemente gRPC in my .net core 3.1 projects. Although it works in my local, does not work on server. I try to implement every things that is necessary in my

I need to update a Blazor page to update whenever the query string changes

I have a Blazor component named NavBar.razor that displays a Radzen navigation menu with a list of tags. When the user clicks a tag (RadzenPanelMenuItem), the c

Entity Framework .Include() with condition not working

SCENARIO If I split the Entity Framework linq query to evaluate an IQueryable first and after try to include some properties, the value of AccessGroupAccessPoin

CORS Error while calling .Net WebAPI from Axios

I have a login form from where I am calling the .Net API from react using Axios axios .post( 'https://localhost:5001/login', { email: 'abc@gmail

Equivalent to ControllerBase's `IsLocalUrl` in Blazor

So I normally have an endpoint in a controllerbase where I check if a given url is local or not with Url.IsLocalUrl(returnUrl), but I can't find an equivalent t

ASP.NET Core MVC - posting to a different action name does not bind the values

I'm using a regular html form instead of @html.BeginForm and I have these 2 form tags in my Create.cshtml view file. I was experimenting with routing, but my po

Scroll Chat Window in Microsoft Teams

I am trying to make an application that would allow me to copy a chat(archive) from "Microsoft Teams". I used SPY++ to get window handles and then I used WIN32

Process terminated. Couldn't find a valid ICU package installed on the system in Asp.Net Core 3 - ubuntu

I am trying to run a Asp.Net Core 3 application in Ubuntu 19.10 thru terminal using dotnet run command but it does not seem to work. I get this error. Process

Json file was not found in Android

I am developing a game for mobile and can't create a normal save system because when playing on the phone the error is logged: Could not find the file. I use th

FunctionsStartup vs IWebJobsStartup, problems reading HttpHeaders on the request

I am building a .NET Core 3.1 Azure Functions application on my local and am trying to configure a startup class. When I implement a class to inherit from Funct

Map nested object with Automapper in C#

I use the latest version of AutoMapper 10.1.1 in my .NET Core project. I have a simple database for learning new words in a language I want to learn. I have the

EntityFramework is very slow to compare strings because create a nvarchar sqlparameter instead of varchar

I have this sample query: context.BarcodeTipiDoc.AsQueryable().Where(d => d.Barcode.CompareTo(minBarcode) > 0); That query runs very slow because Entit

.Net 6/7, C#, desktop three-tier app: use gRPC or not?

.Net 6/7, Windows/Linux, C# mostly. I am developing a set of applications on a three-tier architecture. There are many clients (up to ten in the normal case) re

Expression can't be evaluated, because there is a negative frame on top of the stack

I'm creating a test station program in C# where I communicate with a test pcb through a ftdi to Uart cable. All works fine but sometimes my application crashes.

Angular and .Net Core Project VS 2022: An unhandled exception occurred: Project 'Leon\AppData\Roaming\ASP.NET\https\<projectName>.pem' does not exist

Hello I am building an Angular/.Net Core project and creating the projects by following Microsoft's suggestion, https://docs.microsoft.com/en-us/visualstudio/ja

Specflow is not executing tests in Visual Studio 2019

I have a very weird behavior with Specflow that only applies to one team member. Everyone else have no issue what so ever. The VS2019 testrunner is correctly d

How to fix C# Warning CA1416 in vscode?

I'm just starting to learn C# following Brackeys on Youtube. Upon writing along I get this problem pop up in vscode: { "resource": "/d:/OneDrive/Programming/You