Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DllNotFoundException thrown with Preview 5 [Bug] #1365

Closed
AlexLablaiksSAP opened this issue Jun 18, 2021 · 4 comments
Closed

DllNotFoundException thrown with Preview 5 [Bug] #1365

AlexLablaiksSAP opened this issue Jun 18, 2021 · 4 comments

Comments

@AlexLablaiksSAP
Copy link

Description

Running a new .NET MAUI App project (dotnet new maui -n MauiFive) created in Visual Studio 2019 Preview 2 with Maui Preview 5 throws a System.DllNotFoundException with a message of "Unable to load DLL 'Microsoft.Graphics.Canvas.Text.dll' or one of its dependencies: The specified module could not be found." I will attach the call stack (CallStack.txt).

Additionally, I am observing warning icons over the SDK portion of the WinUI Dependencies in the Solution Explorer (see screenshot).

Steps to Reproduce

  1. Update to Visual Studio 2019 Preview 2
  2. Install Microsoft .NET SDK 6.0.100-preview.5.21302.13 (x64)
  3. Perform dotnet new maui -n MauiFive
  4. Open the MauiFive.sln, Build and Run
  5. System.DllNotFoundException Exception is thrown with "Unable to load DLL 'Microsoft.Graphics.Canvas.Text.dll' or one of its dependencies: The specified module could not be found."

Expected Behavior

No exception is thrown and the screen renders correctly.

Actual Behavior

Aforementioned exception is thrown and the screen is a blank purple one which will correctly render when resized as indicated in #1362

Basic Information

  • Version with issue: Visual Studio 2019 Preview 2 w/ .NET SDK 6 Preview 5
  • Last known good version: Visual Studio 2019 Preview 1 w/ .NET SDK 6 Preview 4
  • IDE: Visual Studio 2019 Preview Edition
  • Platform Target Frameworks:
    • UWP: net6.0-windows10.0.19041
  • Nuget Packages: (Same as template)
    • "Microsoft.ProjectReunion" Version="0.8.0-preview"
    • "Microsoft.ProjectReunion.Foundation" Version="0.8.0-preview"
    • "Microsoft.ProjectReunion.WinUI" Version="0.8.0-preview"
  • Affected Devices:
    Windows 10 Enterprise; Version 20H2; OS Build 19042.985

Screenshots

Uncertain if related, but here is the screenshot of the warning icons in Solution Explorer:
SolutionExplorerWarningIcons

Workaround

Ignore the exception, allow the blank screen to render and then resize the window, similar to #1362.

Additional Attachments

CallStack.txt

@En3Tho
Copy link

En3Tho commented Jun 18, 2021

I'd like to add that there was a WinUI (package) project which was used to run Blazor (not like it really did for me). Now with updated template it is missing. In my case program simple fails with COMException (0x80040154) - (0x80040154 (REGDB_E_CLASSNOTREG)).
In my case there is no workaround as application simply crashes.

When running project from VisualStudio I get:
The project doesn't know how to run the profile MyBlazorApp.BlazorClient.Maui.WinUI.

@Fabi
Copy link

Fabi commented Jun 18, 2021

I'd like to add that there was a WinUI (package) project which was used to run Blazor (not like it really did for me). Now with updated template it is missing. In my case program simple fails with COMException (0x80040154) - (0x80040154 (REGDB_E_CLASSNOTREG)).
In my case there is no workaround as application simply crashes.

When running project from VisualStudio I get:
The project doesn't know how to run the profile MyBlazorApp.BlazorClient.Maui.WinUI.

You need https://marketplace.visualstudio.com/items?itemName=ProjectReunion.MicrosoftSingleProjectMSIXPackagingTools

@En3Tho
Copy link

En3Tho commented Jun 19, 2021

@Fabi Thank you.

@Eilon
Copy link
Member

Eilon commented Jul 16, 2021

Please make sure you follow the latest steps here to install all the requirements: https://github.com/dotnet/maui/wiki/Getting-Started

Most requirements are installed by the maui-check tool, but there are a few VSIX tools you have to install individually for WinUI support.

@Eilon Eilon closed this as completed Jul 16, 2021
@dotnet dotnet locked as resolved and limited conversation to collaborators Feb 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants