340,756 questions
0
votes
0
answers
20
views
WiX MSI installer not stopping and removing .NET 8 Windows service
Here is my .wxs file contents:
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Package Name="...
1
vote
1
answer
34
views
Windows.System.Profile.HardwareIdentification.GetPackageSpecificToken throws exception
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....
0
votes
0
answers
39
views
Does anybody else have issues with sideloading after updating to Visual Studio 2026?
I recently updated my Visual Studio to the newest version (2026). Since I updated, my Android devices no longer appear in the list of devices. But even worse, since the update they don't appear in my ...
0
votes
1
answer
41
views
editorconfig rule to enforce that namespace is set in all C# files
I want to set a rule in .editorconfig so that all C# files where namespace is not explicitly set should render an error.
I've added these:
dotnet_diagnostic.IDE0130.severity = error # Namespace does ...
1
vote
0
answers
22
views
Problem with Roslyn configuration on neovim
I've been trying to setup roslyn.nvim with rzls.nvim on my neovim for a while to work with .NET, C# and Blazor. But I've been facing some frustrating problems, I'm using WSL Ubuntu 24.04, a neovim ...
Best practices
1
vote
5
replies
82
views
Handling mutable models in MVVM
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 ...
-1
votes
0
answers
56
views
VS Code fails to run .NET, even if I installed it
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: ....
Best practices
0
votes
3
replies
64
views
Can a Composite Component class inherit from another abstract base class without breaking the Composite pattern?
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
├── ...
0
votes
1
answer
24
views
Issue with Python Visuals in Power BI Embedded (.NET Core)
I am facing an issue with Power BI Embedded reports in a .NET Core application. The report contains Python visuals, which work correctly in Power BI Desktop and Service, but they do not render when ...
1
vote
1
answer
44
views
TSC TE210 Printing extra label when print executed by application
I want to print data on a label.
I created a ZPL template file and in my application i read that template file, look up a specific string, replace that string with data from my application and then ...
Best practices
0
votes
3
replies
64
views
Is there anyway to get physical disk Idle time without 1 second wait needed for PerformanceCounter.NextValue function?
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 ...
0
votes
1
answer
127
views
SQL CLR function bad performance comparing to .NET App
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($...
Advice
0
votes
2
replies
66
views
System.Text.Json Polymorphic Deserialization not binding Type Discriminator property
I'm trying to do a polymorphic deserialization using System.Text.Json in net-8.0. Here is my schema.
[JsonPolymorphic(TypeDiscriminatorPropertyName = "type")]
[JsonDerivedType(typeof(Manager)...
0
votes
1
answer
45
views
Set dotnet version to use for debugging
Is there a way I can set the dotnet version to use for the debugger. I am using the one (debugger) that comes with C# Dev Kit. I currently have dotnet 8 and dotnet 2.2 installed but the debugger ...
Tooling
0
votes
0
replies
24
views
Easy mappings for GraphQL requests without using the GraphQL Client
I am trying to send requests to an API that uses GraphQL for its data filtering. The problem I am having that I need to build each request manually through a string interpolation which is easier said ...
-2
votes
0
answers
58
views
A .NET utility is running slowly after upgrading to Windows 11 [closed]
I have several utilities written in C# for .NET 4.8. After upgrading from Windows 10 to 11, the utilities are running ~4 times slower. Has anyone encountered this?
The utilities parse large files (~...
2
votes
1
answer
43
views
Can't get TextBlock to fill the ComboBoxItem in Avalonia
The ItemTemplate for my ComboBox is like this:
new FuncDataTemplate(
typeof(object),
(item, _) => new TextBlock
{
HorizontalAlignment = HorizontalAlignment.Stretch,
Text ...
0
votes
0
answers
45
views
Access to path '/app/wwwroot/Uploads' is denied
I'm using docker image to deploy my asp.net application
and i'm facing 2 issues.
The first one: after some deployes the api list still the same although a made changes on it (it seems like image ...
0
votes
0
answers
39
views
Title: Fixing Shaking and Jumping in Custom LoopPanel with Inertia Scrolling and Snap-to-Item
I have a custom LoopPanel in WinUI, and I’m trying to implement inertia smooth scrolling and a snap-to-item feature.
I implemented both features, but I’m seeing some weird behavior: the panel shakes ...
5
votes
1
answer
202
views
.NET 9 -> .NET 10: MongoDB query using array.Contains throws NotSupportedException
After upgrading from .NET 9 to .NET 10, a MongoDB query that used to work now throws a System.NotSupportedException during query execution. I'm looking for pointers whether this is a runtime change in ...
Advice
0
votes
2
replies
41
views
Deploying ASP.NET API and ASP.NET MVC app on the same IIS default site
I have this scenario: I have an ASP.NET API which is deployed on IIS under the default web site. I have added the API by right click on default web site -> add application. API is working fine and ...
Advice
0
votes
3
replies
44
views
How to set the value in the basic many-to-many relationship example of EF?
Here's a basic example from the official .NET documentation for a many-to-many relationship using EF and .NET:
public class Post
{
public int Id { get; set; }
public List<Tag> Tags { get;...
0
votes
1
answer
36
views
How to fix ERR_INVALID_URL_SCHEME when initializing C# in WebAssembly in node.js?
While I was able to get my C# code running in the browser as WebAssembly, I get errors like this when trying to run any (vitest) unit tests that load the module that initializes .NET:
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯...
-2
votes
1
answer
105
views
docker-compose dependency on one .NET service ruins its healthcheck
I have the following docker-compose.yaml to roll my application. When I comment depends_on on newseo service, containers start with no issue and all healthchecks are passed. However, when I add ...
Best practices
0
votes
0
replies
40
views
How to run tests with CDK pipelines
We are building and deploying a few system using the AWS CDK Pipeline, mostly with dotnet
Most cases we are building the deployed apps using dockerfile assets referenced in the CDK
Should we run the ...