34 questions from the last 7 days
0
votes
0
answers
19
views
MacOS VSCode dotnet 10 Build a blazor movie database tutorial unable to 'dotnet ef migrations add InitialCreate'
λ ~/ dotnet --version
10.0.100
λ ~/ system_profiler SPSoftwareDataType SPHardwareDataType
Software:
System Software Overview:
System Version: macOS 26.1 (25B78)
Kernel Version: ...
0
votes
0
answers
36
views
Unable to authenticate to Twitter API
I am trying to write an incredibly simple C# console application that will just post a single tweet on my twitter on my behalf.
I have a developer account and read the reference, including the parts ...
0
votes
0
answers
54
views
RabbitMQ .Net unsupported external secret error [closed]
hi everyone first of all i did what i all know but it doesnt work
services:
hotelreservationapi-presentation:
image: hotelreservationapi-presentation:latest
build:
context: ./...
0
votes
0
answers
12
views
Use a build Target to create resource files that need to be embedded during the build
I have a project where I need to dynamically create .resx files based on other input files that are coming from somewhere else. These created .resx files then need to be compiled and embedded in the ...
1
vote
0
answers
62
views
IHost does not release log file after Dispose()
I'm trying to read a log file that was written from a custom ILoggerProvider in a dotnet application:
HostApplicationBuilder builder = Host.CreateApplicationBuilder();
builder.Logging.ClearProviders();...
1
vote
2
answers
104
views
How to call Postgres function from .NET? [closed]
I tried this code:
CREATE OR REPLACE FUNCTION public.t4(in iid int, OUT n1 text, OUT n2 text)
LANGUAGE plpgsql
AS $function$
BEGIN
SELECT DISTINCT n1=l.name, n2=l.comment from ...
Best practices
0
votes
4
replies
102
views
Disposing FileStream in .NET
I need to process a list of FileStream objects with the DoSomethingWithFileStreams method like below. If I write code like this, I am concerned that the list of FileStream gets disposed before they ...
-3
votes
1
answer
70
views
Should I reorder triangle vertices depending on their position to ensure correct winding (CW/CCW)?
I draw triangles in OpenGL using DrawArrays():
public void DrawTriangle(
Vector2 a,
Vector2 b,
Vector2 c,
ShapeOptions shapeOptions = null)
{
shapeOptions ??= PresentationConsts.Shape....
0
votes
1
answer
51
views
Could not load file or assembly 'MyProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified
I have a main project of type console, and it references other library-type projects in the application. When I build the solution, it compiles normally, but when I run it in debug mode, it tries to ...
0
votes
1
answer
52
views
How can I get Liquid Data Mapper to target .NET 8 and not .NET Framework 4.6.2?
When I generate a data mapper library using Liquid Data Mapper, it always binds to .NET Framework 4.6.2, but I need it to target .NET 8.
How can I change this functionality?
My source is a CSV file ...
-1
votes
1
answer
57
views
Publish Failed, but able to build successfully, and run
My project is able to build and run, but when I want to publish the project, I get this :
Warning As Error: Detected package downgrade: System.Net.NameResolution from 4.3.0 to 4.0.0. Reference the ...
0
votes
0
answers
59
views
.NET Framework SDK project: Launch arguments duplicated for x64 platform
I'm working on a C# .NET Framework 4.8 SDK-style project (WPF, Sdk=Microsoft.NET.Sdk).
I want to pass command-line arguments to my project when running from Visual Studio. I created a launchSettings....
1
vote
0
answers
41
views
Angular Aria Autocomplete Feature - Compilation Error
I am working with a .NET + Angular WebApp Project
I added Angular Aria to the Angular project hoping to use their Autocomplete feature for a Select Box.
I copied the code directly from the first ...
1
vote
1
answer
21
views
How to create an APK file from a Xamarin project using the command line?
Can you tell me what I need to do to get the APK through the console?
How do I check that all the needed tools are installed?
And which command or set of commands will create the APK file?
I can ...
1
vote
0
answers
44
views
How can I define a structure type in an OPC-UA server?
I am using OPCFoundation.NetStandard.Opc.Ua.Server (version 1.5.377.22) and would like to:
Create a structure data type on the server.
Create a variable node of that data type on the server.
Set ...
0
votes
1
answer
35
views
Weird blurring / gradient mask effect in safe area on dotnet MAUI maccatalyst
I'm building a dotnet maui application. One of the targets that I am using is Mac OS X maccatalyst. My app consists of a hybrid web control that goes into the safe area with negative top margin so ...
1
vote
0
answers
65
views
My MCP Server is not discovering my custom tools
I have a stdio mcp server running locally. The mcp server builds and runs. I have created 3 basic mcp tools that I will use for context when I prompt in Copilot however my tools are just not ...
1
vote
0
answers
29
views
Socket with SignalR and kubernetes
I encountered a problem when deploying a socket application using signalr. I connect with the longpolling method and it still works, but the websocket gives an error: Error: Failed to start the ...
1
vote
1
answer
103
views
'SQLite Error 19: 'FOREIGN KEY constraint failed'.' while try to insert data
I am trying to run my database code, but I keep getting this error and I've done whatever I can think of to fix it, whether it is random posts, or chatgpt, but I can't seem to figure it out. The ...
0
votes
0
answers
32
views
EKS SignalR Hub - ALB Connection Handling Issue
SignalR hub running as an EKS pod handles 700 VUs via ALB but fails at 720+, yet successfully handles 1000 VUs via kubectl port-forward with 85% free CPU and 43% free memory. This confirms the ...
1
vote
0
answers
55
views
Dotnet Restore cannot find .NET 9 packages (NU1102) even though they exist in internal Artifactory NuGet
We use an internal Artifactory NuGet feed inside our organization.
Here is my NuGet.Config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<...
-3
votes
0
answers
65
views
Microsoft Learn sample C# code issue on .NET 10.0 [duplicate]
I have just started learning C# from its official tutorial in Microsoft Learn. In the record type section I saw this code:
public record Point(int X, int Y);
public static void Main()
{
Point pt = ...
0
votes
1
answer
93
views
AWS S3 .NET SDK download fails for .mp4 and .mp3 files with IOException: “An existing connection was forcibly closed by the remote host”
I’m using the AWS S3 .NET SDK (Amazon.S3 + TransferUtility) to download files from an S3 bucket.
Most file types download correctly (.txt, .zip, .webm, .ogv), but .mp4 and .mp3 always fail with this ...
0
votes
0
answers
62
views
Why does DevExpress Report only display one row despite multi-row data source?
I am working with DevExpress v24.1 in a C# Windows Forms application. I am facing an issue where my DevExpress report only displays a single row of data, even though the assigned data source contains ...
0
votes
0
answers
44
views
Is it possible to add a column to a datatable read from a file?
I have a DataTable read from a csv file:
ID,ItemCode,ItemDescription
1,Test0,test item
2,Test2,second test item
When I try to create an additional column as in https://learn.microsoft.com/en-us/...
0
votes
1
answer
76
views
Why is my appsettings.json being ignored?
I have an ASP.NET Core 8.0 web application. In the appsettings.json I have a connection string defined. One pointing to a local database and one pointing to another database.
"ConnectionStrings&...
0
votes
1
answer
49
views
WPF returns UnsetValue on RelativeSource to Ancestor
I was able to create a neat context menu that controls visibility of columns and wanted to show values of hidden ones in a tooltip, but I'm unable to, because somehow the very same binding is ...
-1
votes
0
answers
23
views
CefSharp instancing a new application when Cef.Initialize
i'm having trouble initializing Cef since i updated its version, we are using the version 89.0.170 and we upgraded to 140.1.140. the scenario is a follow:
internal static class Program
{
...
Tooling
0
votes
0
replies
38
views
Using OSDP.Net library how to poll PD (card reader) for presence of card
In the OSDP.Net library there is ControlPanel class representing control panel (ACU), which communicates with one or several PD (card readers). Class has RawCardDataReplyReceived event, which is ...
0
votes
1
answer
89
views
Is it possible to implicitly convert 'method group' to Delegate?
I tried experimenting with the new C#14 extension syntax. As an example, I wanted to implement a simulation of function currying using the << operator.
public static class Curry
{
extension&...
2
votes
1
answer
107
views
Entity Framework/Linq Get Last Record From List With Condition
I have a list of records, by multiple UserID's.
TableID UserID Status
------------------------
1 3 3
2 4 3
3 3 4
4 4 3
5 5 4
6 ...
0
votes
0
answers
52
views
How to fix IIS Express profile error in Visual Studio 2022? [closed]
I am trying to run my .NET project in Visual Studio, but whenever I start the application—whether using Debug or Run—I get an error popup saying:
This project doesn't know how to run the profile with ...
Advice
0
votes
0
replies
38
views
How to implement session timeout in .NET Framework 4.7.2 application
We have several applications built in .NET Framework 4.7.2 that uses .NET Identity for authorisation and authentication. I am trying to implement a session timeout, in line with OWASP recommendations.
...
-1
votes
1
answer
60
views
Dapper query with parameter not holding temp table in subsequent query [duplicate]
I have C# code that executes a Dapper Query, creates a temporary table, and uses a parameter to pass a value. In a subsequent query temp table is not available and will throw an error
Invalid object ...