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

Project restore fails for .NET MAUI Hybrid App on .NET 8 - Workload dependency issue #40978

Closed
egvijayanand opened this issue May 17, 2024 · 4 comments
Assignees
Labels
Area-Workloads needs team triage Requires a full team discussion untriaged Request triage from a team member

Comments

@egvijayanand
Copy link

egvijayanand commented May 17, 2024

Description

Have created a new .NET MAUI Hybrid app on .NET 8 and tried to restore the dependencies.

Unfortunately, the restore failed even after installing the prerequisite workloads.

Here's the list of workloads installed.

Installed Workload Id Manifest Version Installation Source
android 34.0.95/8.0.100 SDK 8.0.300, VS 17.10.34902.84
ios 17.2.8053/8.0.100 SDK 8.0.300, VS 17.10.34902.84
maccatalyst 17.2.8053/8.0.100 SDK 8.0.300, VS 17.10.34902.84
maui 8.0.21/8.0.100 SDK 8.0.300
maui-windows 8.0.21/8.0.100 SDK 8.0.300, VS 17.10.34902.84
wasi-experimental 8.0.5/8.0.100 SDK 8.0.300

Steps to Reproduce

  1. Create a new .NET MAUI Hybrid app on .NET 8
  2. Try to restore the project, it results in an error
  3. Run the workload restore command and then try project restore again
dotnet new maui-blazor -o MauiApp1
cd MauiApp1\
dotnet restore
dotnet workload restore

Link to public reproduction project repository

The default template itself is sufficient, no authored code

Version with bug

8.0.40 SR5

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.21 SR4.1

Affected platforms

Android

Affected platform versions

Android 34.0

Did you find any workaround?

Nope.

Relevant log output

C:\Program Files\dotnet\sdk\8.0.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147
: To build this project, the following workloads must be installed: wasi-experimental [E:\MauiApp1\MauiApp1.csproj::TargetFramework=net8.0-android]
C:\Program Files\dotnet\sdk\8.0.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147
: To install these workloads, run the following command: dotnet workload restore [E:\MauiApp1\MauiApp1.csproj::TargetFramework=net8.0-android]
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@egvijayanand egvijayanand changed the title Project restore fails for .NET MAUI Hybrid App on .NET 8 Project restore fails for .NET MAUI Hybrid App on .NET 8 - Workload dependency issue May 17, 2024
@PureWeen PureWeen transferred this issue from dotnet/maui May 17, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Workloads untriaged Request triage from a team member labels May 17, 2024
@egvijayanand
Copy link
Author

This issue is not specific to the Hybrid app. Observed in the regular app as well.

A show stopper. Needs at least a workaround immediately.

@Forgind Forgind added the needs team triage Requires a full team discussion label May 28, 2024
@marcpopMSFT
Copy link
Member

marcpopMSFT commented May 28, 2024

@egvijayanand are you able to provide the output of dotnet build -getItem:MissingWorkloadPack and the output of dotnet workload --info?

@egvijayanand
Copy link
Author

@marcpopMSFT This issue can be marked as closed as I'm unable to reproduce this issue after updating to VS2022 17.11 Preview 1.0.

@Forgind Forgind closed this as completed May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Workloads needs team triage Requires a full team discussion untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

3 participants