How to Change C# Version of a UWP Program?

水 知 165 Reputation points
2023-12-14T12:15:09.33+00:00

I want to use new version C# in my UWP APP, such as C# 11 or even C# 12, but there's no <LangVersion> in the .csproj file of a UWP project. What should I do?

Developer technologies | Universal Windows Platform (UWP)
{count} votes

Accepted answer
  1. Junjie Zhu - MSFT 21,646 Reputation points
    2023-12-15T03:06:24.0133333+00:00

    Hello @水 知 ,

    Welcome to Microsoft Q&A!

    How to Change C# Version of a UWP Program?

    We cannot change the C# version of UWP project.

    I want to use new version C# in my UWP APP, such as C# 11 or even C# 12,

    According to the document C# language versioning, UWP supports up to .NET Core3.0, So the C# version of UWP is up to C#8.0.

    Thank you.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.