Category "c++sharp"

WinForms Form is never garbage collected due to reference from ServiceScope

I have a WinForms Form(s) that is not always garbage collected. The form loads quite a bit of data and when it is not garbage collected, it can cause a signific

How to install/Store NuGet Packages inside the Visual Studio Project's folder?

I have already read similar questions but the provided answers do not resolve my issue. I need to put all the required NuGet packages by a project inside its ow

How to write to the Azure Log Stream

I am trying to get achieve something similar to Console.WriteLine() in Azure Portal. From what I can find, you need to use System.Diagnostics.Trace for that. Bu

ASP.NET Core 6 identityserver (duende) : no DefaultAuthenticateScheme found or no CookieAuthenticationScheme configured on IdentityServerOptions

So here's our setup. we have Angular web app Identity server API (ASP.NET Core 6, duende identity server) Identity server config in Program.cs: builder.Serv

Implement form parts in different classes

I have a main window with two buttons (this is a simplified description). A click on a button opens another form. Both buttons open different forms. I'd like to

Does a WPF app in the new Microsoft Store require signing?

Microsoft is rolling out the new store that accepts MSI/EXE apps. I've been granted access for my new WPF app. I'm new to WPF dev and struggling with what I sho

How to get test coverage percentage on Azure Pipeline?

I have coverlet.collector installed in my project. Then I have added the below into my Yaml file. - task: DotNetCoreCLI@2 inputs: command: test

How to merge two lists using LINQ Suming especifics fields with sublists

Considering I have 2 list (listaProduto1 and listaProduto2), both with same properties, but with different values. I need the result merge both lists, but it mu

Mouse Cursor on tablelayoutpanel

I have winform project that it has tablelayout panel. And i added pictureboxes to all cells. I want the mouse cursor style to cross while on the tablelayoutpane

Extreme UDP-Package-Loss in HoloLens2 -UWP-Application

In my HoloLens2 application sometimes the UDP-Package-receive rate drops instantly from 40 packages per second to 0-2 packages per second and stays there (size

find the smallest integer N, such that

I am stuck for quite a while now on the following task: find the smallest integer N, such that A^N < N! I want to do this in C# and A can be so big that ther

.NET Core 3.1 Writing file to network drive

I am trying to get user to upload a document from the web interface and have it stored on the network share *\dfsms\shared\MyProject* , it also saves the entry

C# array issue due to indexing of int

I am fairly new to this and trying to learn. I am struggling trying to make a loop to find the max value in an array. I am not sure what I am doing wrong. I hav

Session not working in ASP.Net Core Web API

I am trying to use the session capability in ASP.NET Core Web API (.NET Core 3.1). As a test, I configured my project as follows. Install NuGet package Microsof

EF Core - Unable to resolve service for type DbContext while attempting to activate ApplicationContext

I am attempting to scaffold CRUD razor pages using entity framework but the code generator throws the following error: There was an error running the selected

Convert Word doc and docx format to PDF in .NET Core without Microsoft.Office.Interop

I need to display Word .doc and .docx files in a browser. There's no real client-side way to do this and these documents can't be shared with Google docs or Mic

Is there something like Rust's std::option_env in csharp?

In Rust you can inspect environment variables at compile time like so: let sha: Option<&'static str> = option_env!("CI_COMMIT_SHA"); println!("CI_COMM

Can't establish wss connection [React + ASP.NET Core, SignalR + nginx]

I have React app that talks to Asp.Net core API. Both of them are deployed on Docker on my VM. Nginx is installed and configured to resolve domain names for app

Upload File from Angular to .Net

I am trying make a post with my form along with a file. I tried see others posts but without result. If I make the post without the file, works just fine. Engli

VS2022 Configure Azure keyvault not seeing local secrets.json

I want to build an new .net core console application using the Azure KeyVault. I use the connected services wizard and select azure keyvault. It recognizes the