11,338 questions with C#-related tags

Sort by: Updated
1 answer

while deploying dacpac using dacservice, facing System.IO.IOException: The directory name is invalid

While deploying DacServices, facing below error Note: after restarting machine its working fine. Issue occurred intermediate System.IO.IOException: The directory name is invalid. at System.IO.__Error.WinIOError(Int32 errorCode, String…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,338 questions
asked 2025-03-12T08:53:37.9133333+00:00
Aleem, Rabiul 0 Reputation points
edited the question 2025-03-12T13:09:47.02+00:00
Jiachen Li-MSFT 33,781 Reputation points Microsoft External Staff
1 answer One of the answers was accepted by the question author.

WPF C# fitting different Screen Sizes

Hi, I'm coding a nice smart tiny app :) and coding on a desktop PC - yesterday Im starting to test a release version and create a setup project - already done. For testing I put the setup file on my old notebook - and ahhhhhhh can't believe it. My…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,338 questions
asked 2025-03-10T22:23:29.0366667+00:00
Jim Jupiter 40 Reputation points
accepted 2025-03-12T11:01:13.6233333+00:00
Jim Jupiter 40 Reputation points
0 answers

Cannot Assign x:Name to Elements Inside ContentControl in WPF UserControl

Hello, I have created a UserControl in WPF that contains a ContentControl. This ContentControl can accept any external content (Grid, StackPanel, TextBox, etc.). However, when I use the UserControl in another page and try to assign x:Name to elements…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,338 questions
asked 2025-03-12T10:23:16.67+00:00
fatih uyanık 200 Reputation points
0 answers

How to set clipboard data with the image that is not local when setting?

Hi, I'm trying to implement a feature, "copy" operation in my web APP will call C# dll API to set the image files data into clipboard, the image files don't exist locally, when user do "paste" operation, the app downloads the image…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,338 questions
asked 2025-03-10T15:42:25.72+00:00
kai xiong 21 Reputation points
commented 2025-03-12T09:46:43.5933333+00:00
Jiale Xue - MSFT 49,126 Reputation points Microsoft External Staff
0 answers

My dll cannot be deleted, so deployment fails suddenly

portalWeb deployment task failed. (Web Deploy cannot modify the file 'MyProgram.dll' on the destination because it is locked by an external process. In order to allow the publish operation to succeed, you may need to either restart your application to…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,338 questions
asked 2025-03-12T08:39:37.7433333+00:00
Christina Quast 0 Reputation points
commented 2025-03-12T09:39:40.3733333+00:00
Jiale Xue - MSFT 49,126 Reputation points Microsoft External Staff
0 answers

SSIS Script Task: Split a JSON array into a list

I have a JSON array of the form: "data": [ {"tag1": 1,"tag2": 2,"section1": {"tag3": "Dummy"},"tag4": 3,"array1": ["dummy","dummy"]}, {"tag1":…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,338 questions
asked 2025-03-11T14:41:08.5666667+00:00
Peter Bishop 181 Reputation points
commented 2025-03-12T08:36:28.6533333+00:00
Peter Bishop 181 Reputation points
2 answers

Microsoft Extensibility SDK for C# for SQL Server

https://learn.microsoft.com/en-us/sql/language-extensions/tutorials/search-for-string-using-regular-expressions-in-c-sharp?view=sql-server-ver16 As mentioned in the above link carried out all the steps. However when I execute below command I am getting…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,338 questions
asked 2025-03-06T10:50:46.18+00:00
Tarale, Sandeep 0 Reputation points
edited an answer 2025-03-12T07:44:35.1533333+00:00
Hongrui Yu-MSFT 4,925 Reputation points Microsoft External Staff
1 answer

SSIS DT_TEXT column contains alternating CHAR(0) characters

I have an SSIS package that is pulling JSON data from a REST source. This was originally pulling data as (DT_STR, 8000, 1252) and writing to a [varchar] column but we have started getting a couple of values than will not fit. I have changed the source to…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,338 questions
asked 2025-03-10T16:13:40.14+00:00
Peter Bishop 181 Reputation points
commented 2025-03-12T06:43:24.1066667+00:00
Jiale Xue - MSFT 49,126 Reputation points Microsoft External Staff
1 answer

Microsoft.Exchange.WebServices.Data (401) Unauthorized error

I have a c# application that is getting the following error: Error: Microsoft.Exchange.WebServices.Data.ServiceRequestException: The request failed. The remote server returned an error: (401) Unauthorized The app failes on the following line:…

Microsoft Authenticator
Microsoft Authenticator
A Microsoft app for iOS and Android devices that enables authentication with two-factor verification, phone sign-in, and code generation.
8,302 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,338 questions
Exchange Server Development
Exchange Server Development
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Development: The process of researching, productizing, and refining new or existing technologies.
573 questions
asked 2022-02-25T20:04:39.793+00:00
Jose Correa 1 Reputation point
edited a comment 2025-03-12T06:41:21.53+00:00
Jack J Jun 24,881 Reputation points Microsoft External Staff
1 answer

Ho to control "Microsoft.Azure.WebJobs.Script.WebHost.Middleware.SystemTraceMiddleware" logs being sent to my Datadaog?

We have integrated the datadog for capturing the azure function application insights logs. Its taking too much of our datadog resources. How to control that? I tried many methods like putting different values in the host.json, But nothing is…

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,526 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,338 questions
asked 2025-02-17T05:24:50.19+00:00
Vijayasundhar Nanjundan 0 Reputation points
commented 2025-03-12T06:03:18.0566667+00:00
Vijayasundhar Nanjundan 0 Reputation points
1 answer

Detecting Microsoft patch updates

Hi All, I am looking for detecting Microsoft patch updates programmatically using C#. The idea is to know the patch update time on the windows machines. Any help is much appreciated. Regards, Pradeep Pasam

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,338 questions
asked 2025-03-07T04:20:44.4133333+00:00
Pasam Pradeep Sabarinadh 0 Reputation points
commented 2025-03-12T02:49:02.6966667+00:00
Jiale Xue - MSFT 49,126 Reputation points Microsoft External Staff
0 answers

Method AppInstallManager.StartProductInstallAsync() not working on a service in release mode

Hi team, I’m trying to download a product using the method appinstallmanager.startproductInstallasync() on my service, but it seems to not be working. Actually, when I use it in debug, it works properly. But when I generate an msix and run it in release,…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,338 questions
asked 2025-03-05T05:06:31.34+00:00
Rhuan Inocêncio 0 Reputation points
commented 2025-03-12T02:39:33.2866667+00:00
Jiale Xue - MSFT 49,126 Reputation points Microsoft External Staff
1 answer

NetworkStream read abends application

I am running into an issue where a read abends my application. Is there a way to handle it in a more soft way so I get the error data, but have it not stop my application. Is it a simply case of changing the LogError functions to a LogInfo? It is…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,338 questions
asked 2025-03-11T21:22:27.76+00:00
Brown, Matt 106 Reputation points
answered 2025-03-11T21:51:38.35+00:00
Michael Taylor 57,136 Reputation points
7 answers

Why are Backspace, Enter, Navigation keys not working while editing any file in Visual Studio?

I am using Visual Studio Extensions, while creating a new solution through extension for the first time, we are only able to type alphabets. Backspace, Enter, Navigation keys are not working while editing any file. But when we force close the solution,…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,448 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,338 questions
Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
252 questions
asked 2023-02-23T04:57:49.38+00:00
Apurva Kamshetty 25 Reputation points
answered 2025-03-11T12:57:36.24+00:00
טיישר אפרים 0 Reputation points
1 answer

WPF: Why BackgroundWorker.RunWorkerCompleted Event() throw an exception and main thread does not receive it?

Our WPF application targets .NET 4.8. The AbortableBackgroundWorkder class inherences from the BackgroundWorker class and used as following. there are two background workers: _protocolProcessorBackgroundWorker..DoWork() will call …

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,338 questions
asked 2025-03-07T20:07:38.0433333+00:00
Jane Jie Chen 466 Reputation points
commented 2025-03-11T09:31:37.9733333+00:00
Hongrui Yu-MSFT 4,925 Reputation points Microsoft External Staff
1 answer

'The instance of entity type 'Book' cannot be tracked' Error in Entity Framework and Displaying Uncommitted Changes in the UI

Hello, I encountered the following issue while working on my C# WPF project: I make updates to an entity on the UI side but do not send these changes to the database. Later, when listing the entity objects I updated on the UI side, I noticed that…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,338 questions
asked 2025-03-09T11:06:43.0733333+00:00
fatih uyanık 200 Reputation points
commented 2025-03-11T08:22:15.82+00:00
Hongrui Yu-MSFT 4,925 Reputation points Microsoft External Staff
2 answers One of the answers was accepted by the question author.

What change does the keyword "await" make?

Hello, Without "await" keyword FileStream.ReadAsync return "Task<int>". With "await" keyword FileStream.ReadAsync return "int". Could you please why this happened? What happens behind the scenes?

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,338 questions
asked 2025-03-08T21:56:27.31+00:00
Shervan360 1,661 Reputation points
answered 2025-03-10T16:57:05.1733333+00:00
Bruce (SqlWork.com) 72,111 Reputation points
2 answers One of the answers was accepted by the question author.

Excel formatting issue in C#

Hi All, I have a WPF application in which I am exporting data to excel. I have merged some cells and added some data to it. After printing I observed some formatting issue where some of the text is cutted and missing:  _excelApp = new…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,338 questions
asked 2025-03-02T16:15:19.0533333+00:00
Pratham Jain 281 Reputation points
commented 2025-03-10T11:21:12.02+00:00
Pratham Jain 281 Reputation points
1 answer

Azure function not showing up when running solution locally VS 2022

I've tried many permutations but with so many files and options I think that listing them would be overkill. I'm using Visual Studio 2022 on Windows 10 to create an Azure Functions app (in C# using .Net6 isolated). I am new to Azure Functions but I'm not…

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,526 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,103 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,338 questions
asked 2023-06-22T18:05:51.3+00:00
fullstackdeveloper 0 Reputation points
commented 2025-03-10T07:53:23.13+00:00
Henrik Byström 0 Reputation points
1 answer

Announcing Control Changes for Screen Readers in My WPF Project?

Hello everyone, In my WPF project, I want to implement screen reader support, particularly in registration forms, for visually impaired users. My goal is to ensure that changes in controls (e.g., textboxes, comboboxes, checkboxes, etc.) and error…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,338 questions
asked 2025-03-04T12:31:02.8766667+00:00
fatih uyanık 200 Reputation points
commented 2025-03-10T01:05:38.16+00:00
Hongrui Yu-MSFT 4,925 Reputation points Microsoft External Staff