Henrique Oliveira
Henrique Oliveira

Reputation: 1

I can't run my MAUI Blazor Hybrid App because I'm missing a Microsoft Windows App Runtime packages. What should i do?

When I create a MAUI Blazor Hybrid App project I always get the same error, which doesn't let me run my app.

After several months of searching through the internet, I finally found an easy fix for this common error in MAUI Blazor Hybrid App projects.

Error Code:

Severity Code Description Project File Line Suppression State Details Warning DEP0840: Project 'FirstSignalR.App' requires packages 'MicrosoftCorporationII.WinAppRuntime.Main.1.3_8wekyb3d8bbwe' and 'MicrosoftCorporationII.WinAppRuntime.Singleton_8wekyb3d8bbwe' with version >= '3000.934.1904.0'. These packages should be installed on first run, if not please visit http://go.microsoft.com/fwlink/?linkid=2222757 for installation instructions. FirstSignalR.App

I was trying to run a new and simple MAUI Blazor Hybrid App project.

Upvotes: 0

Views: 1619

Answers (2)

Romuald Sicard
Romuald Sicard

Reputation: 35

The answer from Henrique Oliveira does not work for me. And I can't comment the response...

When I try to update from nuget manager, VS says that :'the version is Blocked by project' and when I force in csProj, VS can't build because the reference is already included in SDK.

My VS is stuck in Version 17.5.5, should I update ?

Upvotes: 0

Henrique Oliveira
Henrique Oliveira

Reputation: 1

The solution is super simply. You just need to install Microsoft.WindowsAppSDK nuget package.

Step-by-step:

  1. Open a new/already created MAUI Blazor Hybrid App project
  2. Inside Visual Studio, go to: Tools - NuGet Packages Manager - Manage NuGet Packages for Solution
  3. Check the "Include prerelease" box located to the right of the search bar
  4. On the "Browse" tab, search for Microsoft.WindowsAppSDK
  5. Install the package on your MAUI Blazor Hybrid App project (I recommend to install the prerelease version)
  6. Rebuild your project and Run it

If this solution worked for you, don't forget to check it as solution to this problem. 😉

Happy coding for everyone!!!

Upvotes: 0

Related Questions