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

Support for dotnet project requiring workload installation for builds #10117

Closed
1 task done
yamachu opened this issue Jul 1, 2024 · 3 comments · Fixed by #10649
Closed
1 task done

Support for dotnet project requiring workload installation for builds #10117

yamachu opened this issue Jul 1, 2024 · 3 comments · Fixed by #10649
Labels
L: dotnet:nuget NuGet packages via nuget or dotnet L: git:submodules Git submodules T: bug 🐞 Something isn't working

Comments

@yamachu
Copy link

yamachu commented Jul 1, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Package ecosystem

nuget

Package manager version

6.11.0.71

Language version

No response

Manifest location and content before the Dependabot update

https://github.com/yamachu/VoicevoxCoreSharp/blob/main/examples/MAUI/MAUI.csproj

dependabot.yml content

https://github.com/yamachu/VoicevoxCoreSharp/blob/main/.github/dependabot.yml

Updated dependency

No response

What you expected to see, versus what you actually saw

If workload restore was required, run something like dotnet workload restore to verify dependencies in a build-enabled state.
Or, parse csproj without build and verify dependencies.

For example, a similar product that verifies dependencies without build is dotnet-outdated.

Native package manager behavior

No response

Images of the diff or a link to the PR, issue, or logs

https://gist.github.com/yamachu/d3c978b554e74ac5fdc6a94ac6efab51

Smallest manifest that reproduces the issue

No response

@yamachu yamachu added the T: bug 🐞 Something isn't working label Jul 1, 2024
@github-actions github-actions bot added L: dotnet:nuget NuGet packages via nuget or dotnet L: git:submodules Git submodules labels Jul 1, 2024
@jeromelaban
Copy link
Contributor

jeromelaban commented Sep 20, 2024

This is an important piece of support for .NET. Interestingly, this change #9385 was made to enhance that support.

@jeromelaban
Copy link
Contributor

jeromelaban commented Sep 20, 2024

Looking further into this, I'm getting messages like this one, same as the original poster:

/usr/local/dotnet/current/sdk/8.0.303/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 [/tmp/package-dependency-resolution_QwqwLB/Project.csproj]
/usr/local/dotnet/current/sdk/8.0.303/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 [/tmp/package-dependency-resolution_QwqwLB/Project.csproj]

And looking at the .NET source, it may be interesting to set the DesignTimeBuild property to avoid this error since the build is only interested in getting the packages dependency graph.

It would probably need to be set in that group:

<PropertyGroup>
<TargetFramework>{targetFramework}</TargetFramework>
<GenerateDependencyFile>true</GenerateDependencyFile>
<RunAnalyzers>false</RunAnalyzers>
<NuGetInteractive>false</NuGetInteractive>
</PropertyGroup>

@brettfo
Copy link
Contributor

brettfo commented Sep 25, 2024

Good catch and thank you for filing the issue, it's now on our backlog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: dotnet:nuget NuGet packages via nuget or dotnet L: git:submodules Git submodules T: bug 🐞 Something isn't working
Projects
Status: Done
3 participants