Could not load file or assembly ‘Microsoft.Data.Sqlite, Version=9.0.6.0 in .NET 10
Hi, I have Console App I .NET 10 that reference to netstandard2.1: This is the csproj: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType>…
Developer technologies | C#
STEP as in the universal file format
Hi, I'm exploring STEP as in the universal file format. I want to build Console App in .NET 10 on Windows , that convert from different CAD/CAM/CAE software for to STEP. What Microsoft or or other Tools can advise? Thanks in advance, This what Chat GPT…
Developer technologies | C#
Bug -Move SharpCompress from 0.42.0 to 0.44.5 failed
Hi, I'm using Console App in .NET 10 reference to class library :netstandard2.1 as follow: <Project Sdk="Microsoft.NET.Sdk"> **<PropertyGroup>** **<TargetFramework>netstandard2.1</TargetFramework>** Before: After:…
Developer technologies | C#
What is Best Practice for Passing a complex viewmodel from a View to the controller?
I have a view form with a complex VM, and it allows the end user to see dozens of data items in various text boxes (as many as 40). At some point, the user will want to update one or more of the textbox data points, so when the model is modified in the…
Developer technologies | C#
Issue of Swagger, Postman
Hi, Further to https://learn.microsoft.com/en-us/answers/questions/5750852/issue-to-the-deployed-app How to check and ensure Swagger, Postman is functioning well? On the client, how to trigger that Swagger, Postman of the server?
Developer technologies | C#
OpenAPI issue
Hi, Can you help it below? How to fix it? Originally I was with this error "The type or namespace name 'OpenApi' does not exist in the namespace 'Microsoft.AspNetCore' (are you missing an assembly reference?)"
Developer technologies | C#
Change the app icon based on the light/dark mode
In a .NET 9 MAUI application, I would like to change the app icon based on light or dark mode, based on the system. The icon of the application is an SVG image with a transparent background. Is there any example of documentation how to implement it?
Developer technologies | C#
MemoryStream issue
Hi, Any better way to add the following to this?
Developer technologies | C#
ASP.NET Gridview Header column not freezing properly
I'm using gridview with freezing header in ASP.NET application. But, freezing is not showing while running the application. what is the issue in the below code...? <%@ Page Language="C#" AutoEventWireup="true"…
Developer technologies | ASP.NET | Other
Developer technologies | C#
Why am I getting System.Data.SqlTypes.SqlNullValueException?
I have a model (this code is greatly reduced): public class myClass { public DateTime? MyDate {get; set;} } and I have a database table with: create table myTable (somedate datetime null); insert into myTable select null; and I have a linq…
Developer technologies | C#
Byte alignment in C#
I found the following code online, although I had to refactor to support .NET 4. So nint was converted to IntPtr. The code seems to work fine with an alignment of 8, 16, and 32, but breaks down at 64. Any ideas? public static IntPtr ByteAlign(IntPtr…
Developer technologies | C#
Incorrect result in two double variables subtraction (367721.22-159915.31)
While subtracting two double variables in C# code, it provides an incorrect result 367721.22-159915.31 = 207805.91 But in the application code level, it results 207805.90999999997 Note: I'm using .NetFramework 4.8
Developer technologies | C#
I found the following code online, although I had to refactor to support .NET 4. So nint was converted to IntPtr.
I found the following code online, although I had to refactor to support .NET 4. So nint was converted to IntPtr. The code seems to work fine with an alignment of 8, 16, and 32, but breaks down at 64. Any ideas? public static IntPtr…
Developer technologies | C#
Issue to Web API
Hi, How to deploy Web API on the server and ensure it is able to process any concrete request from the client app?
Developer technologies | C#
VSCode Installing C#
Hi, I am trying to setup C# in vscode on my 2013 macbook pro, which runs mac os 11 (latest update available for hardware). I can get a project setup and running with the terminal command "dotnet run" however am struggling to get any useful…
Developer technologies | C#
How to run a console application as a windows service
Hii, I'm currently using .NET Framework 4.8 for Console application, and there's requirement that requires the application to run as a console as well as a windows service. I used OnStart() and OnStop() for handling the start and stop function of the…
Developer technologies | C#
How to use LINQ with 20 databases
The most basic way to connect to a database using LINQ is by building out the ApplicationDBContext class, and even adding a few more classes like it. But I need to select data from as much as 25 databases. In SQL it's easy: SELECT * FROM db1..Table1 join…
Developer technologies | C#
MAUI - Youtube Video link error code 153
Hi, I have a MAUI app, where i am embedding a YouTube link in a webview. Recently it stopped working Error 153 Video player configuration error. Even changing referrerpolicy to strict-origin-when-cross-origin is not working. How to fix it? Any help…
Developer technologies | C#
Can anyone help me to learn the C# advanced concepts?
Hi Guys, I am having 4 yrs of experiencing on C#, since am getting stuck on advanced concepts. Can anyone help me to learn advanced C# concepts to improve my coding skills.
Developer technologies | C#
How to secure both Blazer server and api ?
Hello, I need an advice. I'd like to secure a blazor server app with individual user account. This functionality is embedded with the basic setup, and use cookies. But I also need to protect my web api with the same way. I know about the JWT, but I…
Developer technologies | C#