10,643 questions with C#-related tags

Sort by: Updated
2 answers One of the answers was accepted by the question author.

Number of references to class variable is incorrect

I created a class level variable in the Program.cs file and use it 27 times within that file. I can do a search for the variable name and make sure spelling isn't an issue. If I go look at the number of times the variable has a reference as stated where…

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.
10,643 questions
asked 2024-07-16T15:32:14.52+00:00
Brown, Matt 46 Reputation points
accepted 2024-07-17T22:31:10.37+00:00
Brown, Matt 46 Reputation points
6 answers

Visual Studio find text in code editor auto jumps from the current line to another one

Hello, Does someone knows how to fix an annoying behaviour in the code editor of Visual Studio.? I have a .cs file with 10 000 lines of code. I am positioned within the file to see the lines from 920 to 950 I am trying to find a specific text…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,887 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.
10,643 questions
asked 2021-12-14T15:38:27.647+00:00
Liviu Ionut Olteanu 11 Reputation points
commented 2024-07-17T19:53:19.1833333+00:00
QuickBooksDev 1 Reputation point
1 answer One of the answers was accepted by the question author.

I created a SSIS package to fetch data from an API to store in the Data Warehouse. But I am getting the runtime error in my script task. I even used try/catch to figure out the error, but nothing is working.

Additionally, I am using a variable 'Token' which I declared in ReadWriteVariables. The error - at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at…

SQL Server Migration Assistant
SQL Server Migration Assistant
A Microsoft tool designed to automate database migration to SQL Server from Access, DB2, MySQL, Oracle, and SAP ASE.
517 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.
10,643 questions
asked 2024-07-13T01:33:03.4633333+00:00
Manmohit Singh 20 Reputation points
accepted 2024-07-17T19:25:59.7033333+00:00
Manmohit Singh 20 Reputation points
0 answers

How to migrate KafkaTrigger from in-process to isolated when using schema registry and AVRO

Microsoft is recommending migrating Function apps from in-process to isolated which I am doing in dotnet8. The in-process KafkaTrigger is returning KafkaEventData<byte[]>. With dotnet-isolated it uses…

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,669 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.
10,643 questions
asked 2024-07-17T16:48:17.22+00:00
Greg Moyer 1 Reputation point
0 answers

Blazor hangs when debugging with authentication

Am I the only one who experience that 9 of 10 times Blazor hangs with this message when I use authentication, and after I have logged in?   Any hints on how to get past this issue?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,644 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,500 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.
10,643 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
967 questions
asked 2024-04-07T11:22:21.7633333+00:00
Finn Arildsen 26 Reputation points
commented 2024-07-17T14:39:52.7266667+00:00
Philippe Cayouette 0 Reputation points
0 answers

How to fix Expression: m_pAccessor != 0 Debug Assertion Failed!

Debug Assertion Failed! Program: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll File: C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.39.33519\atlmfc\include\atldbcli.h Line: 5198 Expression: m_pAccessor != 0 For…

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.
10,643 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,634 questions
asked 2024-07-09T12:58:59.3533333+00:00
Shubham Kshirsagar 0 Reputation points
edited the question 2024-07-17T06:17:59.9+00:00
Roy Li - MSFT 32,731 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

How to register device on Entra ID programatically

Hi , I want to register my local device to Entra ID using c#. I have gone through the Microsoft Graph API documentation as well but didn't get any information related to this topic please help me.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,437 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.
10,643 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,617 questions
asked 2024-07-09T07:45:18.6466667+00:00
Akesh Jadhav 20 Reputation points
accepted 2024-07-17T05:16:28.3233333+00:00
Akesh Jadhav 20 Reputation points
1 answer

getting error- The request is invalid. Details: Cannot dynamically create an instance of type 'Microsoft.Azure.Search.DataIdentity'. Reason: Cannot create an abstract class.

I am trying to create a custom web api skillset to connect to document intelligence directly. Created a skillset definition but it throws below error - The request is invalid. Details: Cannot dynamically create an instance of type…

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
865 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,400 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.
10,643 questions
Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,533 questions
asked 2024-07-11T13:23:08.38+00:00
Amrita Madhav 0 Reputation points
answered 2024-07-16T19:07:04.22+00:00
ajkuma 24,971 Reputation points Microsoft Employee
1 answer

System.Exception: 'Days between ViewStart and ViewEnd should be between 1 and MaximumViewDays' in c#

I want to select multiple days in my monthView1, but the error message say."System.Exception: 'Days between ViewStart and ViewEnd should be between 1 and MaximumViewDays'" and here my code. private void monthView1_SelectionChanged(object…

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.
10,643 questions
asked 2024-06-09T06:50:07.66+00:00
BgnerNprg207 286 Reputation points
answered 2024-07-16T17:51:11.0366667+00:00
Waqar Kabir 1 Reputation point
1 answer

System.ArgumentException: Value does not fall within the expected range.

I am making an Excel Addin in C# in Visual Studio. I have already made another simpler Addin and installed it with no problem. But on this one I am getting the following error: “Name: ExcelAddin_RSMeansV.2 From: file:///C:/Users/jstebbins/Desktop/Excel…

Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,690 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.
10,643 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,717 questions
Microsoft 365 Publishing
Microsoft 365 Publishing
Microsoft 365: Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line. Publishing: The process of preparing, producing, and releasing content for distribution or sale.
606 questions
asked 2023-12-05T03:02:02.8933333+00:00
Joshua S 5 Reputation points
answered 2024-07-16T17:24:06.3666667+00:00
Waqar Kabir 1 Reputation point
2 answers

unusual loading of page

Link where event occurred: https://learn.microsoft.com/en-gb/learn/modules/csharp-write-first/2-exercise-hello-world Line due to which event occurred: /Console.WriteLine("Hello World!"); Suggestion: Editor should show a 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.
10,643 questions
asked 2021-09-16T06:21:24.77+00:00
Waqar Kabir 1 Reputation point
answered 2024-07-16T16:55:31.5666667+00:00
Waqar Kabir 1 Reputation point
0 answers

NullReferenceException: Object reference not set to an instance of an object.

I'm using ASP.net mvc. I think there's something wrong with my controller and view. I can't move on with my crud since i'm stuck at the index action. Some help from anyone would be very much appreciated!

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,400 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.
10,643 questions
asked 2024-07-16T05:30:01.9366667+00:00
Zekrom 0 Reputation points
edited a comment 2024-07-16T09:10:26.39+00:00
Zekrom 0 Reputation points
0 answers

Nuget package creation and file removal on uninstall

Hi, I am creating a package for use in dotnet core web applications. Specifically Umbraco 9 CMS. As of recent, it would appear that Powershell scripts are no longer used to populate and remove files on Nuget package installation/ uninstallation with…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,644 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.
10,643 questions
asked 2022-06-10T12:16:43.957+00:00
Adam U 11 Reputation points
commented 2024-07-15T12:43:54.7+00:00
Solomio Sisante 0 Reputation points
3 answers One of the answers was accepted by the question author.

XmlDocument to XmlReader?

Hello I used to load an XML file into an XDocument and keep it intact in memory, then pass it to another object when needed, since it only accepts XmlReader, I was using XDocument.CreateReader. Now am moving from XDocument to XmlDocument, just no idea…

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.
10,643 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,666 questions
asked 2024-07-13T23:12:42.57+00:00
StewartBW 925 Reputation points
commented 2024-07-15T12:37:10.69+00:00
StewartBW 925 Reputation points
1 answer

sửa lỗi này giúp mình với

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,353 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.
10,643 questions
asked 2024-07-09T05:55:00.4833333+00:00
Ngọc Hân 0 Reputation points
commented 2024-07-15T09:47:24.2533333+00:00
Hongrui Yu-MSFT 1,025 Reputation points Microsoft Vendor
1 answer

Help Needed: Errors in Initial .NET MAUI Project

I have created my first .NET MAUI project several times, but to my surprise, errors appear without changing any line of code. Although the application runs fine, the lines remain underlined. I have captured a screenshot so you can see the issue and guide…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,227 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.
10,643 questions
asked 2024-07-08T01:24:07.06+00:00
Roberto C 120 Reputation points
commented 2024-07-15T09:41:34.1466667+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 72,251 Reputation points Microsoft Vendor
1 answer

I dont understand why OnPropertyChanged is not firing in neither my Model or ViewModel

I am using the MVVM Community Tollkit and below is the generated code. I also included my Model code and the OnPropertyChanged Method. I put a breakpoint in the generated code on the property Spousessn and it was fired and OnPropertyChanged in the…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,227 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.
10,643 questions
asked 2024-07-09T21:32:59.66+00:00
Tom Meier 220 Reputation points
commented 2024-07-15T09:40:44.49+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 72,251 Reputation points Microsoft Vendor
1 answer

Saving and reading data in Binary Format

Hello I am developing a Firebase supported project. What I want to do is to take the current data and keep it in a file in Binary format so that it cannot be read easily. I thought of such a method because the data does not contain very sensitive data. I…

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.
10,643 questions
asked 2024-07-08T11:21:44.9866667+00:00
fatih uyanık 80 Reputation points
commented 2024-07-15T08:17:43.93+00:00
Jiale Xue - MSFT 43,046 Reputation points Microsoft Vendor
2 answers

How to detect a device

Hi, I'm currently working on .net core web API project . There is a moment that I can't figure out. I had to detect the device which user used when signed in. I used "user-agent" first but this only says if its smartphone, Desktop etc. And only…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,400 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.
10,643 questions
asked 2024-06-27T20:25:13.6533333+00:00
Atilla Rüstəmli 20 Reputation points
commented 2024-07-15T08:17:13.37+00:00
Atilla Rüstəmli 20 Reputation points
1 answer

The data specified for the media type is invalid inconsistent or not supported by this object

Hi, I have an windows form application which is recording video by using Media Capture. This app is taking hundreds of record in a day but in a few days getting(once in 500-550 record) an error which below; "The data specified for the media type is…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,872 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.
10,643 questions
asked 2024-07-01T14:58:38.8666667+00:00
Ali 0 Reputation points
commented 2024-07-15T07:55:04.8566667+00:00
Jiale Xue - MSFT 43,046 Reputation points Microsoft Vendor