340,756 questions
Advice
1
vote
2
replies
48
views
Dynamic Forms in ADO.NET
I am a newbie in .NET - can someone tell me about dynamic forms? I have done master detail and simple crud - should I go for dynamic form r practice more in master details. I want to know about ...
0
votes
2
answers
60
views
C# project with a package reference to a nuget with an exe assembly
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 ...
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="...
0
votes
0
answers
25
views
Issue with Template.Json not excluding files
I have built a template project with a Template.json and this will generate the template fine ( no errors at all )
ive also managed to add some choices to the symbols that will add or hide code ...
0
votes
1
answer
26
views
"No operations defined in spec!" when using MMLib.SwaggerForOcelot to build combined swagger for Ocelot
This is my ocelot configuration...
{
"Routes": [
{
"UpstreamPathTemplate": "/api/test/{url}",
"DownstreamPathTemplate": "/api/{url}",...
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
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
├── ...
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 ...
12
votes
4
answers
3k
views
installing dotnet-ef dotnet tool throws error
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:
...
Best practices
0
votes
3
replies
62
views
Apply [ApiController] to all controllers implicitly
Adding [ApiController] on a controller class has various benefits. Especially the automatic model validation and problem details parts.
The problem with this attribute is that it's easy to forget to ...
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 ...
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
76
views
Error in flush at downloading file with VB.Net
I'm trying to download files through a popup window. Most of files download correctly, but some one through this error:
Error in /Controladores/Descarga.ashx?guid=4b5050f6-2f69-41e1-8bd6-1113686e9575
...
0
votes
0
answers
35
views
Can a .NET project template automatically add a project reference to an existing project in the solution when added from Visual Studio?
I have a system where users create .NET plugin libraries. To support this, I’ve built:
A solution template that creates:
a plugin project
a testbed console app
a project reference from the testbed → ...
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 ...
-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 (~...
0
votes
0
answers
19
views
Revit 2024 API: Family cannot be loaded from fixed file path (Truss Hole Add-in)
I'm building a Revit 2024 add-in that places a circular void hole where the user clicks in the model.
The hole family has a “Diameter” parameter and cuts only structural framing members around the ...
0
votes
1
answer
126
views
Deserializing array of objects to concrete .NET types using Newtonsoft
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<...
1
vote
1
answer
33
views
.NET Serilog ReadFrom Configuration doesn't work
Working version:
private static void SetLogging(WebApplicationBuilder builder)
{
Log.Logger = new LoggerConfiguration()
.Enrich.FromLogContext()
.MinimumLevel.Override("...
2
votes
2
answers
84
views
How to globally override the default value of a property in Avalonia?
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&...
-4
votes
0
answers
52
views
Make COM Server (Widget provider) ready for AOT [closed]
I have couple of windows 11 widgets. Implemented with the sample provided by microsoft which isn't AOT compatible. I found this question / awnser which looks very useful
How to rewrite the Windows App ...
-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 ...
1
vote
3
answers
109
views
Can I "soft reload" a Blazor page component without a full browser reload?
I'd like to reload a Blazor page component without triggering a full browser reload.
Using NavigationManager to reload works, but I'm looking for a softer approach:
The page itself stays loaded, so ...
2
votes
1
answer
146
views
How do I use .NET reflection to emit generic interfaces and a class which implements them
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 ...
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;...