All Questions
7,342
questions
0
votes
0
answers
29
views
Problem installing .NET SDK in Visual Studio Code
I'm trying to use C# in VS Code which requires me to install the .NET SDK.
I'm following the steps provided by VS Code to install it, but it doesn't work, even after reinstalling it does not work.
...
0
votes
0
answers
10
views
Difference between using "dotnet pack" and "GeneratePackageOnBuild"?
I understand that using dotnet pack is intended for creating NuGet packages, and dotnet publish is intended for creating deployable DLLs/EXEs. However, using the GeneratePackageOnBuild property in the ...
2
votes
1
answer
127
views
Why is C# DateTime.Now/DateTime.UtcNow ahead of SQL Server's SYSUTCDATETIME()/SYSDATETIME() even though C# code executes before the SQL Query
I want to know the reason why my C# date is larger than the SQL date even though the C# code is running first and after that the SQL query,
Logically the SQL date should be greater than C# date.
For ...
0
votes
0
answers
26
views
Any pitfalls in upgrading a WPF application from .Net 6 to .Net 8?
We're looking to upgrade some large WPF solutions from .Net 6 to 8, and my understanding is that the process should be straightforward (changing the projects' target framework). But are there any ...
0
votes
0
answers
12
views
IRequestExceptionHandler fails to be properly resolved while response type is generic
Inspired by
https://code-maze.com/csharp-global-exception-handling-for-mediatr-requests/
Using MediatR is it possible to create a generic RequestExceptionHandler for any and all requests?
I was trying ...
0
votes
0
answers
11
views
Blazor WebAssembly in Docker: Client Shows 'This page isn’t working right now' Error
I have a project with two parts: a server using ASP.NET Core Web API and a client using Blazor WebAssembly (PWA). I'm trying to containerize both parts using Docker. While the build and run processes ...
0
votes
0
answers
54
views
.NET Core: 'The SSL connection could not be established, see inner exception' error when using a .cert file
I am trying to call a service with .NET Core. At first, I used a .cer file, but it was not working.
I tried to set ServerCertificateCustomValidationCallback as shown here, I tried everything like ...
0
votes
0
answers
17
views
System.Net.Http.Json is not taking Fields into account when serializing or deserializing to JSON [duplicate]
When trying to Serialize a model which has data stored in fields System.Net.Http.Json is outputting an empty JSON Object. It works only when I use property with getters and setters.
I tried looking ...
0
votes
0
answers
25
views
How to convert .NET DateTime to kafka Timestamp & Date types [duplicate]
I need to convert .NET DateTime fields to the corresponding Kafka Java types as declared on the Java library before producing messages to Kafka.
How to convert a .NET DateTime to Kafka Timestamp & ...
0
votes
1
answer
46
views
How to update 100 of NuGet Package which is Vulnerable, Deprecated and Older version that is compatible with current code when Major Version Change [closed]
There are 150+ NuGet Package and some are Vulnerable, Some are Deprecated and most of the are not older version. I am updating NuGet Package one by one and see any incompatible issue arises. if any ...
0
votes
0
answers
31
views
C4642 Warning in C++ CLR Library (DLL) with Winform (.Netcore8)
I am getting this warning in my C++ CLR DLL with Winform in .NetCore 8
warning C4642: 'IHandle': could not import the constraints for generic parameter 'THandle'
warning C4642: 'HandleRef': could not ...
0
votes
0
answers
46
views
Could not load file or assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=*' or one of its dependencies
I have a C#(Business Logic) and .NET Core project. It was working fine on windows server 2012. I have updated the operating system to windows server 2022. Now I am facing this problem on all the ...
0
votes
1
answer
15
views
Updating Nuget related Unity to latest cause error on WebAPIConfig Registration
There is an .Net solution that contains .Net 4.7.1 MVC Web App and .Net Core 8.0 Library and Web API.
Updated Unity and its related NuGet PAckage as given below.
Unity.5.8.5 -> Unity.5.11.10 and ...
0
votes
1
answer
83
views
How to loop through Inner list of object
I have a need where I need to loop through sublist of each class.
public Class A
{
public int IdA {get;set;}
public string Name {get;set;}
public List<Class B> Items {get;set;}
}
public Class ...
0
votes
1
answer
39
views
Azure .NET List Blobs in Container Matching Folder Directory
I have a URL for an Azure Container (i.e. https://<redacted>.blob.core.windows.net/<redacted>?sp=r&st=202*-**-**T18:56:55Z&se=202*-**-**T03:56:55Z&spr=https&sv=202*-**-**&...