340,349 questions
1
vote
0
answers
55
views
iOS: Can a third-party app access a wired FTDI USB-serial optical probe? (Works on Android)
Can a third-party iPhone app use a generic FTDI USB-serial optical coupler?
I'm building a cross-platform (.NET iOS / C#) app that reads smart meters via a wired optical head. The head uses an FTDI ...
0
votes
0
answers
92
views
Why does the Handle count in C# Windows/WPF application keep increasing while idle?
We have Windows/WPF application targeting .NET 4.7.2 on Windows 11 OR windows server 2019 where the handle count keeps increasing even when the application has just launched and is idle.
On page load, ...
0
votes
0
answers
122
views
How to auto-generate a .cs file from a JSON file at design time in VS Code without a manual build?
I have a permissions.json file at the module root that serves as the single source of truth for permission constants. I want a Permissions.g.cs file to be regenerated automatically the moment I save ...
0
votes
0
answers
60
views
Unable to Enable/Install .Net Framework 3.5 [closed]
I've been able to install other versions of the .Net framework but not 3.5. It says I have .Net framework 3.5 installed in program files under the enable/disable windows features. but I am unable to ...
Advice
0
votes
1
replies
109
views
How to clear cache in reactjs 18.3.1( frontend) - .NET 10 (C# - Backend)?
I am updating my language settings through a C# Controller in .NET 10 which is for my back-end and my frontend is made with React 18.3.1. Furthermore, the web app is a hybrid app in which we want to ...
1
vote
2
answers
203
views
How to show an Exception's stack trace docked when the Exception is caught?
Currently, while stepping through, every time an exception is thrown and caught, I get a small dialog in which I need to scroll both horizontally and vertically to see the stack trace, which is not ...
Best practices
3
votes
6
replies
348
views
In C# 14 how to sort an array in reverse order?
What is the most idiomatic way to sort an array in reverse order in C# 14? Arrays now have methods from the MemoryExtensions class.
For example, given the following array:
int[] arr = [3, 1, 2, 5, 9];
...
0
votes
0
answers
68
views
How can I place a circular (curved/round) stair in Smart 3D (S3D) using a custom command in C# & .NET?
How can I place a circular (curved/round) stair in Hexagon Smart 3D using a custom command in C#?
I can create a straight stair in Hexagon Smart 3D using:
Stair stair = new Stair(system, part, top, ...
-1
votes
0
answers
171
views
Async/await locking where await Task.Run does not in ASP.NET MVC application
I have an ASP.NET MVC application on .NET 4.7.1. This is a POST method on a System.Web.Mvc.Controller. If I call DoSomething2 directly, the application locks up on the next use of async in the nested ...
Best practices
0
votes
4
replies
104
views
Best approach for Docker health checks in .NET containers without curl/wget?
have a .NET application running in Docker and need to configure container health checks.
Currently I see a few options:
Option 1
Install curl in the runtime image.
Use Docker HEALTHCHECK with a ...
Best practices
0
votes
3
replies
154
views
How can I create a responsive office floor layout planner using HTML, CSS, and JavaScript?
I am building a web application for an interior design company that allows users to visualize office workstation layouts. The goal is to create a responsive floor plan where users can drag and drop ...
0
votes
0
answers
72
views
.NET MAUI Windows Switch (ToggleSwitch) shows white background for disabled OFF state and hover OFF state
I am working with .NET MAUI on Windows (WinUI) and using the default Switch, which maps to ToggleSwitch.
I am trying to achieve consistent styling for different switch states, but I am facing issues ...
Best practices
0
votes
3
replies
163
views
Why can't I use required with private init and a private constructor in C#?
public record Example
{
public required string Property { get; private init; }
private Example() { }
public static Example Create(string property) => new Example { Property = ...
Tooling
0
votes
1
replies
92
views
Where can I find the reference source for ISerializationSurrogateProvider and DataContractSerializerExtensions in .NET Framework 4.8?
I am looking for Microsoft's reference source for the types DataContractSerializerExtensions and ISerializationSurrogateProvider in .NET Framework 4.8.1. The reference source in .NET Framework 4.8 or ...
2
votes
0
answers
112
views
SerializationException: DataContractSerializer has no knowledge of type after migrating from .NET Framework 4.7.2 to .NET 8 [closed]
I recently migrated a WPF application from .NET Framework 4.7.2 to .NET 8. After the migration, deserializing previously saved binary XML files (written using XmlDictionaryWriter.CreateBinaryWriter) ...