Skip to main content
Filter by
Sorted by
Tagged with
12 votes
4 answers
3k views

I’m trying to install the Entity Framework Core CLI tools globally using the .NET CLI command: dotnet tool install --global dotnet-ef However, the installation fails with the following error message: ...
tutte2k's user avatar
  • 301
0 votes
1 answer
208 views

I'm working on a high-performance ASP.NET Core Web API where each request can return hundreds of entity records. Each entity includes multiple navigation properties and nested objects. Currently, I’m ...
Mina Golzari Dalir's user avatar
Best practices
3 votes
3 replies
87 views

I have the following application architecture: FrontEnd → ApiServer 1 → ApiServer 2 → Database So, the frontend calls a web server, which calls multiple API which make query on database. What is the ...
Massimo Lavermicocca's user avatar
0 votes
1 answer
127 views

In our system we are hashing passwords with the following method. public static string HashPassword(string password, byte[] salt) { if (salt == null) { throw new ArgumentNullException($...
Cerkvenic's user avatar
  • 377
Best practices
2 votes
2 replies
65 views

I am pondering whether the using TransactionScope should be within a try..catch or the other way around. Within try..catch try { using (var scope = new TransactionScope()) { ...
AngryHacker's user avatar
  • 62.1k
Best practices
0 votes
3 replies
64 views

I’m studying and implementing the Composite design pattern in C# for a university project. In most textbook examples (GoF, Refactoring.Guru, etc.) the class hierarchy looks like this: Component ├── ...
user31880897's user avatar
2 votes
1 answer
146 views

I am trying to use .NET reflection to emit a class and some interfaces which the class implements. However, I cannot seem to correctly implement the interfaces that are generic, as that results in ...
pmikkelsen's user avatar
4 votes
1 answer
92 views

I'm attempting to deserialize an XML response from an API. The data is as follows (I have only included a small chunk for the sake of a small post): <ns1:alerts xmlns:ns1="http://gov.fema....
alexjusti's user avatar
Best practices
1 vote
5 replies
82 views

In an MVVM architecture, models should be kept free of UI-related logic. They represent pure data that is retrieved from memory via a service. I see a challenge when the user interface needs to ...
jjb's user avatar
  • 37
0 votes
1 answer
126 views

I have a couple of classes (simplified): internal class OrderItem { public string Name { get; set; } public Order Order { get; set; } } internal class Order { public IReadOnlyList<...
bairog's user avatar
  • 3,539
2 votes
0 answers
139 views

I use VS code (not VS cause i have linux) and have been trying to run my c# template from run and debug in VS code but it does not works and returns this error in output. -----------------------------...
Lazare Janiashvili's user avatar
0 votes
1 answer
164 views

It's no problem to set the position of the new WinForm inside the monitor where the main window is displayed. For example: Form1 form = new Form1(); form.Show(); form.StartPosition = FormStartPosition....
vsm's user avatar
  • 69
0 votes
1 answer
70 views

I’m using Firebase Admin .NET SDK v3.4.0 with .NET 8. The methods GoogleCredential.FromFile(), FromJson(), and FromStream() are not available anymore in this version. I need to load my Firebase ...
Minh Tuấn Bùi's user avatar
1 vote
2 answers
87 views

I have a request (going to an APIM endpoint.) From Postman the test runs just fine, but from my code it fails with a 400. I looked at the requests in fiddler and the only difference is this: // This ...
Fraser Orr's user avatar
2 votes
0 answers
108 views

I’m exploring how .NET shared frameworks work (for example, Microsoft.NETCore.App and Microsoft.AspNetCore.App) and I’m wondering if it’s possible to define and use a custom shared framework that can ...
Lorenzo Yang's user avatar
-1 votes
0 answers
84 views

This question has been bouncing around my head for a few years and I wanted to finally ask it. The question is: how does the CLR implement static fields in generic types? Under the hood, where are ...
Corey Kosak's user avatar
  • 2,633
0 votes
2 answers
60 views

I know that in the early times of .NET Framework, you could build an assembly into EXE and then use that "EXE assembly" as a dependency of another .NET Framework assembly which, too, could ...
Pavel Foltyn's user avatar
0 votes
1 answer
41 views

I am trying to display the stack traces of RTOS fibers running in a C++ solution in VS2022. Since upgrading to Windows 11 there seems to be a problem in the implementation. The existing approach, ...
Sparky_335's user avatar
0 votes
0 answers
67 views

Hi Ive run into an issue i have an object in c# and in that attribute i have added a number field ( something that should in the code be unique for each value such as ) public class ...
Bithellio's user avatar
Best practices
0 votes
3 replies
64 views

I trying to develop user-friendly program that do not block physical disk with 100% usage (so even entering My Computer takes around 10 seconds). My program calculate hash for many (180k) small files ...
Kosmo零's user avatar
  • 4,190
-1 votes
0 answers
87 views

I have a C# installer app that needs to identify which user session to target. The application fails to identify the correct user when deployed via Microsoft Intune. For example, when deployed via ...
Bob22's user avatar
  • 7
1 vote
1 answer
32 views

I'm trying to get a hardware id with a .net console app (target framewotk is net8.0-windows10.0.17763.0). The code is rather trivial, just var token = Windows.System.Profile.HardwareIdentification....
Volker's user avatar
  • 1,849
-1 votes
0 answers
56 views

When I open a workspace in VS Code, I get this error message notification on the bottom right corner : Failed to run .NET runtime. You may be missing key Linux libraries. Install them now? Source: ....
Thomas's user avatar
  • 396
1 vote
1 answer
80 views

I have a number of HTTP triggered Azure Function apps that do not time out when in production. However, when I want to debug them by stepping through the code (in Visual Studio 2022), slowly and ...
zeiddev's user avatar
  • 710
2 votes
2 answers
84 views

I'm trying to override the default value of ToolTip.ShowOnDisabledProperty to be true for all controls. I've tried the following: static App() { ToolTip.ShowOnDisabledProperty.OverrideDefaultValue&...
zacoons's user avatar
  • 371