The MAUI application's UI does not render properly on a machine that does not have Visual Studio installed.

Viral Rathod 0 Reputation points
2024-12-12T08:55:44.2133333+00:00

I am encountering an issue where the UI of my .NET MAUI application does not render properly on a machine that does not have Visual Studio installed. Here are the specific details:

System Information:

  1. System 1 (Windows 10):
    • Processor: Intel(R) Core(TM) i3-5005U CPU @ 2.00 GHz
    • RAM: 12 GB
    • OS Version: Windows 10 Pro, 22H2 (OS Build 19045.5131)
  2. System 2 (Windows 11):
    • Processor: Intel(R) Core(TM) i5-4300U CPU @ 1.90 GHz
    • RAM: 12 GB
    • OS Version: Windows 11 Pro, 21H2 (OS Build 22000.2538)

Issue Details:

  • The application works correctly on machines with Visual Studio installed.
  • On machines without Visual Studio, the WebView fails to render the UI correctly or doesn’t load completely.

Questions:

  • Are there specific dependencies or runtime components related to WebView in .NET MAUI that Visual Studio typically provides?
  • How can I ensure my .NET MAUI application (especially the WebView) is fully self-contained and functions properly on machines without Visual Studio?
  • Could the hardware limitations of my PCs (e.g., 4th generation CPU, GPU, or memory) contribute to rendering issues with the WebView in .NET MAUI applications?

Additional Notes:

  • I published the .NET MAUI app to an MSIX file and installed it on a Windows 10 Pro, 22H2 OS Build 19045 system without Visual Studio, and it works as expected.
  • However, on other systems without Visual Studio, the WebView UI issue persists.
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,807 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.
11,186 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 69,121 Reputation points
    2024-12-18T16:27:08.7533333+00:00

    If webview2 is not installed, then Maui falls back to the old webview.

    https://learn.microsoft.com/en-us/microsoft-edge/webview2/

    1 person found this answer 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.