Category "c++sharp"

C# Couldn't process file xxx.resx due to its being in the Internet or Restricted zone or having the mark of the web on the file

I have an issue while I try to build project in VS2012. It cannot build due to the error: Couldn't process file xxx.resx due to its being in the Internet or Res

Should I take ILogger, ILogger<T>, ILoggerFactory or ILoggerProvider for a library?

This may be somewhat related to Pass ILogger or ILoggerFactory to constructors in AspNet Core?, however this is specifically about Library Design, not about how

Can c#/Razor work with DyGraph WITHOUT Javascript?

In this question: Previous DyGraph question There is still the need to go to JavaScript to call DyGraph: <script type="text/javascript"> g = new Dygraph

How to check an empty object?

I have a number of objects. Some of them have string properties and some of them have bool properties. I'm using them in multi-step form. so each step is bound

OmniSharp failure: Can't create task 'GetReferenceNearestTargetFrameworkTask'

I'm using VSCode with C# extension (checked version - it's latest - 1.23.11) and quite happy with it. However, today it suddenly stopped working (no Intellisens

Why won't EF Core update this item on my database?

I'm having trouble updating an item on my database. I've tried several different ways, but nothing seems to work. Here is my latest attempt: public async Task

System.Text.Json.JsonSerializer.Serialize adds \u0022

How can I set JsonSerializer to not add "\u0022" to string for EventData property? Because I get: {"Id":5,"CreateDate":"2021-04-21T05:26:30.9817284Z","EventDat

Draw a Line on Canvas With Mouse Position Unity 3D

I followed a tutorial to draw a line using mouse position, the line will be drawn inside the canvas. But when running it, the line didn't drawn! and it gives me

How Can I add keys in Registry Editor whe the app is installed?

I need to add a key cause I need that my application starts at the same time as windows, this is what've done so far. [RunInstaller(true)] public partial class

How do I save outlook Mailitem as sent mail

I have created an Outlook mail item and want to save it in a folder as a sent mail. I was able to set sender mail using mail.SentOnBehalfofName. How do I add Da

How to loop though and change background color of each item in a list [closed]

I'm trying to change the Console.BackgroundColor for each item in a list, and am wondering how I would go about doing so. public static List&l

message shows undefined when ajax post in ASP.net

Hi I'm Fairly new at coding and in asp.net and had an error occurred to me please help me if you can. This is my script when I run the code given below using an

Pie Chart is not viewing in the HTML reports after converting from .trx with tool TRXER

I have converted the .trx file to HTML reports but pie chart is not showing on html reports. I have Chrome 79+ version. I created html reports after using this

ASP.NET Core Web API - Cannot instantiate implementation type 'System.Net.Http.IHttpClientFactory' for service type

I am trying to use Dependency Injection to register service in ASP.NET Core-6 Web API. I got this interface: public interface IHttpClientService { Task<T

Cannot reference Umbraco generated model

I have an Umbraco 8 site using Models builder and I cannot seem to reference a generated model, as suggested is possible by Umbraco [documentation][1]. My model

MSBuild on NET 5 Core projects produces different bin/x64 and bin/Debug folder structures

I am having an awful time understanding how MSBuild works with NET Core project files (csproj) on Windows 11. I have 71 NET Core C# project files (executables,

Turn `ReloadOnChange` off in config source for WebApplicationFactory

This is both a question and an answer. I've fixed my problem, but it seems a bit wrong. My original problem is running my asp.net core integration tests in a b

Unable to Write json variable c# getting an error

I get an error when I try to serialize or update a json file. I just want to update the value of "balance" inside a json file and I got the idea here... I can't

form.show doesn't show all the content on the form like forms.showdialog

I am currently developing a GUI that helps users pick a test to run for a DUT. The program controls a bunch of lab equipment via visa com drivers and logs the d

Hangfire RecurringJob "does not contain a method with signature"

I am using Hangfire configured in my WebAPI .NET Framework 4.7.2 application. I am configuring it inside the Global.asax.cs My dependency injection chain is con