Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [.net]

Do NOT use for questions about .NET Core - use [.net-core] instead. The .NET framework is a software framework designed mainly for the Microsoft Windows operating system. It includes an implementation of the Base Class Library, Common Language Runtime (commonly referred to as CLR), Common Type System (commonly referred to as CTS) and Dynamic Language Runtime. It supports many programming languages, including C#, VB.NET, F# and C++/CLI.

-2 votes
0 answers
35 views

In C# which library is faster to use read and write Excel or CSV? [closed]

I'm an intern, and right now I have an Excel sheet assignment. I therefore need the data to be retrieved from an Excel sheet or CSV file. I now use the Microsoft.Office.Interop.Excel library, however ...
Sri's user avatar
  • 1
0 votes
1 answer
20 views

.NET MAUI Editor Control Keyboard Problem

The Editor control in .NET MAUI has no keyboard style with a "Done" button except for "Numeric" and "Telephone" styles. This is a problem. If a user taps in an Editor ...
DA Consulting's user avatar
0 votes
2 answers
40 views

Deserialize JSON objects do different class names

I am using System.Text.Json to deserialize objects from an external API call in C#. I have created the classes for the data and is very straight-forward. public class DocumentListRoot { ...
JimboJones's user avatar
1 vote
1 answer
21 views

How to set a JsonSerializerOptions globally for my httpClient.GetFromJsonAsync<T> calls

In my ASP.NET web API I have httpClient which call GetFromJsonAsync: var jsonSerializerOptions = new JsonSerializerOptions { PropertyNameCaseInsensitive = true, }; ...
Nicolas's user avatar
  • 6,404
1 vote
1 answer
28 views

Mock Google's StorageClient ListObjects method using Moq

I'm trying to unit test the following method public List<string> GetFilesInGCS(string bucket, string node) { List<string> fileNames = new List<string>(); try { ...
Jason Everett's user avatar
0 votes
0 answers
13 views

Multi-Framework Targeting for NuGet Packages

Background - My Build Scripting I would like to use the dotnet CLI to create a nuget package that can target the following frameworks: net462, net48, net8.0. My library has no dependencies (i.e. it ...
user25651170's user avatar
0 votes
1 answer
24 views

How does OpenIdConnectEvents get overrided?

below is the source code: https://source.dot.net/#Microsoft.AspNetCore.Authentication.OpenIdConnect/OpenIdConnectHandler.cs,1288 where await Events.AuthorizationCodeReceived(context); must exchange ...
secondimage's user avatar
0 votes
1 answer
38 views

Microsoft.Data.SqlClient data layer equivalent [closed]

In Microsoft.Data.SqlClient which is the equivalent of System.Data.SqlClient data layer? I'm rewriting an old procedure from a fired collaborator and now I have that problem... It's a simple question ...
Andrea's user avatar
  • 1
0 votes
1 answer
28 views

msbuild error: AssemblyRef does not contain a definition for 'Configuration'

I am 'migrating' a visual studio build to a batch script, I have a one big project that has many dependencies, i build my project with msbuild.exe using windows batch script, the main project (client) ...
Shachar297's user avatar
1 vote
1 answer
25 views

Convert one object to two different DTOs based on a condition

In one of our projects we are using .NET AutoMapper (version 10.1.1). In others, we realized using AutoMapper is too complex and moved to direct manually mapping which is way faster and way more ...
broadband's user avatar
  • 3,438
2 votes
1 answer
129 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 ...
Shivam's user avatar
  • 29
0 votes
2 answers
45 views

Fetch documents/files from share point drive

We have multiple SharePoint sites, and our application is registered on the domain. Currently, we are trying to fetch documents from SharePoint using a client ID and secret, but we are encountering ...
Pooja Parmar's user avatar
0 votes
1 answer
46 views

Getting "System.IO.FileNotFoundException: Could not load file or assembly 'Azure.Core, Version=1.38.0.0" in Azure Function App

Currently, I am running a .NET 8 Azure Function app in Azure. It's a dotnet-isolated function running on a Linux App Service plan. I am getting this error when trying to run the HTTP trigger function: ...
Garran Michaels's user avatar
0 votes
0 answers
13 views

How to install prerequisite during installation

I have already created an installer for my application using the Microsoft Visual Studio 2022 Installer Project. The installer installs my application and automatically launches the setup for any ...
PragadeeshRaj V's user avatar
0 votes
0 answers
24 views

how to manage `_id` field mongodb c# driver

So I am in a bit of pickle Suppose I have this Class which I use to save/retrieve records from MongoDb public class Purchase { public ObjectId Id { get; set; } public PurchaseDetails Purchase {...
sudo's user avatar
  • 944

15 30 50 per page