Microsoft Q&A

.NET

15,288 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

15,288 questions with .NET-related tags

Sort by: Updated
0 answers

Why is Select().Contains() ok while Any() is not?

Hi all; I first tried the following code: var statesIndirectDelete = await States .Where(s => deletedCountries.Any(c => c.Id == s.CountryId)) .ToListAsync(); and that gave me the error: System.InvalidOperationException The LINQ expression…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
513 questions
asked 2023-06-05T03:30:01.6166667+00:00
David Thielen 966 Reputation points
1 answer

Xamarin to MAUI: When setting <UseMaui>true</UseMaui> in csproj, my xaml.cs files are removed

Within the csproj file, when setting the tag <UseMaui>true</UseMaui>, all xaml.cs files that were used with Xamarin are removed. When setting <UseMaui>false</UseMaui> all xaml.cs files are returned. This happens when using the…

XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
644 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,424 questions
asked 2023-05-24T15:02:51.5066667+00:00
Franklin 6 Reputation points
edited the question 2023-06-05T03:24:58.66+00:00
Jack J Jun 23,661 Reputation points Microsoft Vendor
0 answers

Unable to catch exception in DotNetReference-invokeMethodAsync call in JavaScript

catch exception why not in catch code ?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,424 questions
asked 2023-06-02T04:04:07.7633333+00:00
Jockey Zheng 0 Reputation points
commented 2023-06-05T03:21:50.0666667+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 20,366 Reputation points Microsoft Vendor
0 answers

CreateRendererWithContext .net MAUI android

0 i am re using xamarin forms renderer in MAUI. while creating renderer with "CreateRendererWithContext" method getting exception. below is my code. using AndroidPlatform =…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,424 questions
asked 2023-06-01T09:46:36.4266667+00:00
Shirisha Siddamshetti 40 Reputation points
edited a comment 2023-06-05T03:18:15.31+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 16,621 Reputation points Microsoft Vendor
2 answers

Need help to understanding the code

Hi, This is part of a tutorial for OpenAI development: https://www.c-sharpcorner.com/article/building-ai-chatbot-app-with-chatgpt-api-and-blazor-a-step-by-step-guide/ Can you please help me to understand this part of the code: Content = new…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,155 questions
asked 2023-06-04T09:28:54.0266667+00:00
Saeed Pooladzadeh 161 Reputation points
edited an answer 2023-06-05T03:14:58.2633333+00:00
Ruikai Feng - MSFT 501 Reputation points Microsoft Vendor
1 answer

Wrapping Python 3.7 code in C#

I'm looking at wrapping an existing Python project, yt-dlp, in C#.NET. They need Python 3.7. The main thing I want to do is to is call their code, though being able to pass them a delegate, if they use something like that in their code, might help. Any…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
1,158 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.
8,192 questions
asked 2023-06-02T08:47:19.66+00:00
Will Pittenger 281 Reputation points
commented 2023-06-05T03:07:40.31+00:00
Hui Liu-MSFT 17,381 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

How to properly manage multiple versions of dotnet SDKs

I have to build an F# project which requires dotnet 7.0.201. I have dotnet 7.0.302 globally installed. The command could not be loaded, possibly because: * You intended to execute a .NET application: The application 'run' does not exist. *…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
1,158 questions
asked 2023-06-02T01:59:20.4+00:00
oracle 0133 0 Reputation points
accepted 2023-06-05T02:59:03.2733333+00:00
oracle 0133 0 Reputation points
0 answers

Serilog - email sink multiple recipients?

Hi guys, I am trying to send emails to multiple recipients with Serilog but couldn't figure it out. Any help, please? { "Name": "CustomEmail", "Args": { "ConnectionInfo": { …

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,155 questions
asked 2023-06-03T04:14:36.3833333+00:00
Cenk 866 Reputation points
commented 2023-06-05T02:53:24.2233333+00:00
Zhi Lv - MSFT 24,316 Reputation points Microsoft Vendor
0 answers

Net maui visualstate for IsVisible not working ?

Net maui visualstate for IsVisible not working ? when backgroundcolor is working but when setter property as Isvisible is not working , can you help me thanks .. <CollectionView.ItemTemplate> <DataTemplate> …

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,424 questions
asked 2023-06-04T22:24:23.5333333+00:00
Sami 281 Reputation points
edited the question 2023-06-05T02:50:55.49+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 47,896 Reputation points Microsoft Vendor
2 answers

Steadily painted over (slow application)

I am using the following code, but my application becomes quite slow. What I can do? using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
1,158 questions
asked 2023-05-16T06:30:35.65+00:00
FMMM 0 Reputation points
commented 2023-06-05T02:40:33.8833333+00:00
Jiale Xue - MSFT 3,936 Reputation points Microsoft Vendor
1 answer

How to generate a test or development build of an windows desktop application using c#

I have modified my Windows application developed using c# to open through a URL now I want to share this build with my client for testing so how to create a test build in the visual studio can anyone suggest me an approach ?? Thanks in advance. …

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,473 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
1,158 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.
8,192 questions
asked 2023-05-22T13:40:45.9266667+00:00
Dineshkumar.S 346 Reputation points
commented 2023-06-05T02:38:23.6566667+00:00
Jiale Xue - MSFT 3,936 Reputation points Microsoft Vendor
0 answers

How to fix Severity Code APT2062 failed linking references.

Hi There, When I try to run the .Net Maui project on android Emulator I found run time error say that. "Severity Code Description Project File Line Suppression State Priority Error APT2062 failed linking references.C:\ ProgramFiles \dotnet \packs…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,424 questions
asked 2023-06-04T06:50:00.33+00:00
Ahmed Thabet 0 Reputation points
commented 2023-06-05T02:31:19.72+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 47,896 Reputation points Microsoft Vendor
0 answers

CollectionView template not support RTL

Hi, CollectionView template not support RTL. I attached the file:עברית.txt Please see the code: The results is: txt.עיברית <CollectionView ItemsSource="{Binding Data}"> <CollectionView.ItemTemplate> …

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,424 questions
asked 2023-05-29T12:48:07.0333333+00:00
דני שטרית 841 Reputation points
commented 2023-06-05T02:16:13.7833333+00:00
Liqun Shen (Shanghai Wicresoft Co Ltd) 155 Reputation points Microsoft Vendor
0 answers

How to Fix this error APT2000 expected reference but got (raw string) #000000.

Hi There, When I try to run the .Net Maui project on android Emulator I found run time error say that. "Severity Code Description Project File Line Suppression State Priority Error APT2000 expected reference but got (raw string)…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,424 questions
asked 2023-06-04T06:37:21.5333333+00:00
Ahmed Thabet 0 Reputation points
commented 2023-06-05T02:12:30.7966667+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 16,621 Reputation points Microsoft Vendor
1 answer

System.Data.SqlClient.SqlException: 'Incorrect syntax near ')'.'

I am trying to make a simple web that gets your your username,email, etc... and stores it in a sql database (usersDB.mdf) the table name is(users) But I am getting a error saying System.Data.SqlClient.SqlException: 'Incorrect syntax near ')'.' here…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,482 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.
8,192 questions
asked 2023-06-04T15:29:54.3133333+00:00
don 0 Reputation points
edited the question 2023-06-05T02:06:35.48+00:00
Lan Huang-MSFT 15,211 Reputation points Microsoft Vendor
0 answers

how to create a qrcode?

how to create qrCode with url into a stream in api?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,155 questions
asked 2023-06-05T02:02:16.6666667+00:00
mc 1,941 Reputation points
1 answer

The. net call to refresh the tray area code in the win11 system does not take effect when clearing residual icons

The relevant code for refreshing the tray area is called in the win11 system code, and it does not take effect occasionally The residual icon still exists, it can disappear when the mouse hovers over it The code is as follows: const uint WM_MOUSEMOVE =…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
1,158 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,066 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
4,735 questions
Microsoft Managed Desktop
Microsoft Managed Desktop
A cloud-based service that brings together Microsoft 365 Enterprise and adds these features: User device deployment; IT service management and operations; and Security monitoring and response.
15 questions
asked 2023-06-02T04:01:01.6866667+00:00
Xia Xia1 Kang 0 Reputation points
edited a comment 2023-06-05T01:55:49.6866667+00:00
Xiaopo Yang - MSFT 7,106 Reputation points Microsoft Vendor
1 answer

Visual Studio 2022 C# project templates does not create a project

After installing Visual Studio 2022, I attempted to create a new project using the C#/.NET/MVC standard template. When the project is created, it is empty, there are no files created and no project within the new solution.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,160 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
852 questions
asked 2023-05-31T13:17:33.64+00:00
Jeff Dworkin 0 Reputation points
answered 2023-06-05T01:53:38.7433333+00:00
Lan Huang-MSFT 15,211 Reputation points Microsoft Vendor
1 answer

asp.net core odata orderby complex Conditional sorting

asp.net core odata order with two where,how write url 1.summay.contains 2.week [HttpGet]         [EnableQuery(EnsureStableOrdering = false)]         public IActionResult Get()         {             IEnumerable<WeatherForecast> values = new…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,155 questions
asked 2023-06-01T09:14:09.06+00:00
SuperMMC 0 Reputation points
commented 2023-06-05T01:25:15.36+00:00
Chen Li - MSFT 886 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

Button selection like in menu

Hi, Please see https://app.screencast.com/Lgk50on26Xky6 When I select on my left menu side that consist of buttons i want that the buttons will be selected like in web screencast. All others buttons in app not influence from the selection in the my…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,424 questions
asked 2023-05-29T09:10:55.9766667+00:00
דני שטרית 841 Reputation points
commented 2023-06-05T01:14:06.9966667+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 47,896 Reputation points Microsoft Vendor