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.

0 votes
2 answers
56 views

How to create custom parameter attribute FromActionArguments in C# like FromQuery?

I would like to create attribute that will tell that parameter should be filled from action arguments, not from query, route, header or body. ASP.NET is already binding it correctly from ...
35 votes
3 answers
33k views

error: NU1100: Unable to resolve 'MicrosoftOfficeCore (>= 15.0.0)' for 'net5.0'

In Terminal of Visual Studio Code, when I try to run: dotnet add package MicrosoftOfficeCore --version 15.0.0 I get the following error on Visual Studio Code terminal: error: NU1100: Unable to ...
0 votes
1 answer
37 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. ...
12 votes
6 answers
21k views

Can i get the key of a style in code-behind? (WPF)

If I have the following code: Style defaultStyle = (Style)FindResource("MyTestStyle"); Is there a way to get the name of the style (i.e. reverse-lookup)? Something like: string name = defaultStyle....
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: ...
-1 votes
2 answers
49 views

.NET 8 Rate Limiting via Policy

I am trying to run the .NET 8 Rate Limiting Middleware, with a global rate limit, as well as a specific policy for certain endpoints. The global policy is working as expected, but I cannot get the ...
0 votes
0 answers
14 views

Ghostscript Log Creation

I have an application where I am using ghostscript to convert image to pdf. I am using dll of ghostscript and using it in a .Net web api. And ghostscript software is also installed in the server, ...
-2 votes
0 answers
12 views

Convert a html data or string to XSLT and then to pdf or is there any other way to do in C# [closed]

Can someone help me to figure out how we can convert a html data or string to XSLT and then convert to pdf or is there any other way to do in C#.I need to map the values we have in html to pdf. Please ...
0 votes
0 answers
6 views

opentelemtry exports previous custom metrics every 10 sec

I have a .NET application configured to export custom metrics using the OpenTelemetry SDK to Application Insights. I’ve noticed that even when metrics aren’t updated, OpenTelemetry still pushes the ...
0 votes
0 answers
13 views

What is the Mapperly equivalent of AfterMap method in Automapper?

I'm trying to replace AutoMapper with Mapperly in our project due to the latter's performance. However, I'm facing difficulty while replacing AutoMapper with Mapperly because I can't find any ...
0 votes
0 answers
6 views

How can I resolve the error named "callElasticsearch" in APM?

Good morning, I have all the observability of the company in ElasticSearch using APM and now appears an error named "callElasticSearch" with this message: How can I manage that not appears ...
2 votes
1 answer
131 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
1 answer
10 views

.ASPXAUTH cookie not being read by sub application

I have an asp.net v4.7.2 web app setup at, my.example.com in IIS. It uses asp.net Forms Authentication. It's Web.Config: <httpCookies requireSSL="true" /> <authentication mode=&...
0 votes
1 answer
37 views

Why installation of dotnet-ef fails even if --ignore-failed-sources is specified

I'm building a .NET 6 project via Azure DevOps Pipelines. One of the step is to install the Entity Framework tools so a later step can generate a SQL migration script. However, the installation step ...
0 votes
0 answers
12 views

Validation gets lost on tab change

I am using a tab control to group different input fields like text boxes. I am validating the user input of those text boxes via IDataErrorInfo in my view model. Now, when the user input is not valid ...

15 30 50 per page
1
2 3 4 5
22633