Does WinUI3 C# project really need .net runtime?

aluzi liu 486 Reputation points
2023-10-13T05:25:53.0466667+00:00

I have a C# WinUI3 project, target framework is .net 6.

And I setup a brand new Windows10 system, no .net 6 runtime is installed, but why this project can still running?

Does WinUI3 project really need .net runtime?

Windows development | Windows App SDK
Developer technologies | .NET | Other
{count} votes

Accepted answer
  1. Xiaopo Yang - MSFT 12,731 Reputation points Microsoft External Staff
    2023-10-16T02:30:29.3766667+00:00

    Hello @aluzi liu,

    Windows ships with .NET. See How to: Determine which .NET Framework versions are installed.

    • The check mark icon ✔️ denotes OS versions on which .NET Framework is installed by default.
    • The plus sign icon ➕ denotes OS versions on which .NET Framework doesn't come installed but can be installed.
    • The asterisk ***** denotes OS versions on which .NET Framework (whether preinstalled or not) must be enabled in Control Panel or, for Windows Server, through the Server Manager.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Olaf Helper 47,436 Reputation points
    2023-10-13T05:30:36.4066667+00:00

    target framework is .net 6.

    Your app uses .NET Framework 6, so it must be installed on the machine; how else could it work?

    1 person found this answer helpful.
    0 comments No comments

  2. aluzi liu 486 Reputation points
    2023-10-13T05:58:25.3266667+00:00

    But the system is brand new installed, and does not have "C:\Program Files\dotnet" folder

    And I copy "dotnet.exe" tool to this computer, running:

    dotnet --list-sdks

    dotnet --list-runtimes

    both return empty:

    dotnet

    May I say that .net runtime is not installed on this computer?

    0 comments No comments

  3. aluzi liu 486 Reputation points
    2023-10-13T06:05:40.68+00:00

    Windows10 version is 22H2, I can not found "C:\program files\dotnet" folder

    I also copy dotnet.exe tool to this computer, running:

    dotnet --list-sdks

    dotnet --list-runtimes

    Both return empty, so I can confirm that no .net 6 runtime is installed.

    dotnet

    0 comments No comments

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.