Microsoft Q&A

.NET

14,091 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

14,091 questions with .NET-related tags

Sort by: Updated
1 answer

DBContext is not found in adding view scaffolding

DB context class is not displaying in scaffolding

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
744 questions
asked 2023-03-30T06:37:48.22+00:00
akhter hussain 2,921 Reputation points
commented 2023-03-30T07:58:13.6766667+00:00
Lan Huang-MSFT 11,901 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

How to update appSetting for a Background Service (Service Worker) (.NET 6)

Hello, I came to ask you for your help, please. I have created a Worker Service which periodically deletes files in a folder. My path to the folder is stored in an App.config file, I read the value via ConfigurationManager. It works, but I want to be…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,849 questions
asked 2023-03-28T12:34:00.33+00:00
tma9 21 Reputation points
edited a comment 2023-03-30T07:55:06.3733333+00:00
tma9 21 Reputation points
0 answers

Uninstalling Webview2 version 111.0.1661.54 on windows 11

Hi all, I would like to uninstall Webview2 version 111.0.1661.54 and install an older version to allow another app installation. The previous method of uninstalling using setup.exe --uninstall --msedgewebview --system-level --verbose-logging…

Office
Office
A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.
234 questions
Microsoft Configuration Manager Updates
Microsoft Configuration Manager Updates
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Updates: Broadly released fixes addressing specific issue(s) or related bug(s). Updates may also include new or modified features (i.e. changing default behavior).
671 questions
Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
517 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
4,137 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: The period of time during which a program is being executed in a computer.
983 questions
asked 2023-03-30T07:46:35.55+00:00
Isaac Onyango 0 Reputation points
commented 2023-03-30T07:54:40.2533333+00:00
hafsa ashraf 80 Reputation points
0 answers

MAUI fails to deploy Android app

buildoutput.pdf Hi, Ia m trying to deploy my MAUI Android app to my device but keep getting Build Failed and not sure what is the reason. Attached is the build log.. Kindly help.. Thanks, Jassim

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,102 questions
asked 2023-03-29T19:26:50.53+00:00
Jassim Al Rahma 1,166 Reputation points
commented 2023-03-30T07:35:08.9433333+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 13,906 Reputation points Microsoft Vendor
1 answer

TestContext is null when invoking method using Reflection

I am invoking a Data Driven Test Method from another service using Reflection. This Data Driven test read the data from file using TestContext and it is null. The purpose of this service is to run all the End to End tests available in the UnitTest1…

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.
7,600 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
897 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying a test as a means of analysis or diagnosis.
270 questions
asked 2023-03-29T08:14:23.1533333+00:00
Aarti Jangid 0 Reputation points
edited a comment 2023-03-30T07:24:25.57+00:00
Aarti Jangid 0 Reputation points
0 answers

when connect to db2 database it balzor form hangs and stuck ?

I working on blazor web application working on two database sql server and db2 i face issue when connecting to db2 to get some data data retrieved slowly and some times hang and stuck so i need to make best idle case to handle connection issue to db2…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,849 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.
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.
7,600 questions
asked 2023-03-30T07:14:35.2433333+00:00
Ahmed Salah Abed Elaziz 85 Reputation points
1 answer

I have a listview with a groupheader which displays the group name and items underneath it. Is there anyway On click on the header/Group name I can show or hide the items underneath it?

For example : On click of the "Bear" I can show /hide the items

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,932 questions
asked 2023-03-29T20:33:10.1266667+00:00
Albin Lukose 0 Reputation points
answered 2023-03-30T06:57:04.5966667+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 44,311 Reputation points Microsoft Vendor
0 answers

How do I fix APT206 - failed linking file resources and APT2259 'textEnd' is incompatible with attribute iconGravity errors?

I have a Xamarin Forms application that I am migrating to MAUI and I am getting the following 2 errors during compilation. APT2259 'textEnd' is incompatible with attribute iconGravity (attr) flags [start=1, textStart=2]. APT2061 failed linking file…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,102 questions
Microsoft Build
Microsoft Build
A Microsoft platform for building applications with Visual Studio and .NET on Windows.
381 questions
asked 2023-03-20T05:08:57.3866667+00:00
Gorimar, Behzad 0 Reputation points
edited a comment 2023-03-30T06:52:04.3833333+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 17,671 Reputation points Microsoft Vendor
2 answers

How to display and hide drop down lists based on condition drop down list ?

I work on blazor server side I have drop down list condition have 3 option server and database and owner . every option from these three options have one drop down list only so server have drop down list database have drop down list owner have drop down…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,849 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.
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.
7,600 questions
asked 2023-03-29T18:05:28.51+00:00
Ahmed Salah Abed Elaziz 85 Reputation points
answered 2023-03-30T06:47:13.1133333+00:00
Rena Ni - MSFT 1,931 Reputation points Microsoft Vendor
1 answer

textbox cursor at top

i have this code to move to bottom of textbox It does not work //move carat to end of text textBox1.Select(textBox1.Text.Length, 0); textBox1.Focus(); textBox1.ScrollToCaret();

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,849 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
897 questions
asked 2023-03-29T14:46:12.71+00:00
Jordan Halgunseth 1 Reputation point
answered 2023-03-30T06:44:16.7+00:00
Deepak-MSFT 2,151 Reputation points Microsoft Vendor
1 answer

Recognize .NET MAUI Image loading failure

I'm using the .NET MAUI Image control to display images stored on disk. In rare cases an image file can be damaged, so the image cannot be loaded into the Image control. If this happens, I see an exception in the…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,102 questions
asked 2023-03-29T15:46:17.7933333+00:00
Frank16384 0 Reputation points
answered 2023-03-30T06:43:20.6866667+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 13,906 Reputation points Microsoft Vendor
1 answer

Which is best, entity framework core in a class library, MVC or Blazor server side

HI, I am planning to create an MVC project. I wanted to use entity framework core. I am wondering if I should install it in a class library or an MVC project. I see that I can use a class library to make the use of EF more available for any…

Entity Framework 6.0
Entity Framework 6.0
A Microsoft open-source object-database mapper for .NET.
230 questions
asked 2023-03-27T16:21:25.0466667+00:00
commented 2023-03-30T06:40:59.1533333+00:00
Jack J Jun 22,216 Reputation points Microsoft Vendor
0 answers

How to create query builder from dynamic multiple tables by ASP. Net Core?

I want to build a dynamic report by Asp.net core -EF-, that is received tables and columns names from user, and then create SQL query depended on theses inputs, to generate dynamic report, I searched how can create SQL query, but most ways were with one…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,849 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
9,140 questions
asked 2023-03-29T08:16:19.6666667+00:00
Arwa Sami 0 Reputation points
commented 2023-03-30T05:59:29.13+00:00
Ashley Roy 0 Reputation points
1 answer

How to restrict scrolling and panning with single finger and enable with two fingers in UWP ScrollViewer using touch screen?

Hi, In an UWP application, I am having a ScrollViewer in the XAML which contains a StackPanel as Content. In that StackPanel there are some images. XAML: <Grid> <ScrollViewer x:Name="scrollView"…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,932 questions
Universal Windows Platform (UWP)
asked 2023-03-27T06:02:13.86+00:00
Imman Kumar 6 Reputation points
commented 2023-03-30T05:59:25.9966667+00:00
Roy Li - MSFT 28,236 Reputation points Microsoft Vendor
3 answers

How do you impersonate as a different user/service id and then try and connect to sql server using windows authentication?

This is my connection string Data Source =server;Initial Catalog=Database;Trusted_Connection=True;MultipleActiveResultSet=true;Integrated Security=SSPI; After establishing the connection string I am trying to test connection and here instead of it…

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
9,140 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.
7,600 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,329 questions
asked 2023-03-22T06:16:56.6766667+00:00
Adithyan 0 Reputation points
commented 2023-03-30T05:51:19.97+00:00
Adithyan 0 Reputation points
1 answer

Conditional MainPage in AppShell

Hi, I have the below in my AppShell <?xml version="1.0" encoding="utf-8" ?> <Shell x:Class="MyApp.Mobile.AppShell" xmlns="http://schemas.microsoft.com/dotnet/2021/maui" …

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,102 questions
asked 2023-03-29T14:05:55.4833333+00:00
Jassim Al Rahma 1,166 Reputation points
commented 2023-03-30T05:46:22.12+00:00
betalyte 0 Reputation points
0 answers

Why does the .net maui title bar disappear on iOS when using shell.searchhandler?

I am developing a .net maui iOS app that uses shell.searchhandler. The app also uses shell.titleview, which appears above shell.searchhandler in the XAML. When you tap in the search box, the virtual keypad appears, but the shell.titleview disappears.…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,102 questions
asked 2023-03-29T17:27:35.94+00:00
Kurt K 76 Reputation points
commented 2023-03-30T05:41:53.62+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 17,671 Reputation points Microsoft Vendor
3 answers

How do I dynamically replace value in razor syntax based on selectedIndex in dropdown

I have an CSHTML View that has a dropdownlist. In the OnChange event I'm calling reportchange(this) which calls my function reportchange. How can I dynamically use the selectedIndex, this code doesn't work because the Razor code errors out with the…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
744 questions
asked 2023-03-29T13:33:39.8466667+00:00
Bill 0 Reputation points
edited an answer 2023-03-30T05:33:51.1466667+00:00
Lan Huang-MSFT 11,901 Reputation points Microsoft Vendor
1 answer

OnNavigatedTo For ContentView

Hi, What is the alternative to OnNavigatedTo in the ContentView? Thanks, Jassim

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,102 questions
asked 2022-10-01T23:31:22.203+00:00
Jassim Al Rahma 1,166 Reputation points
commented 2023-03-30T05:30:45.4966667+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 17,671 Reputation points Microsoft Vendor
0 answers

Xamarin.Android.Bindings.targets was not found

when running the following command on a xamarin.android class library project dotnet pack --configuration Release I am facing following issue MSBuild version 17.3.0+92e077650 for .NET…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,932 questions
asked 2023-03-29T14:34:43.4766667+00:00
Faizan Haider 0 Reputation points
commented 2023-03-30T05:29:09.82+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 13,906 Reputation points Microsoft Vendor