Skip to content

Automatically update workloads on SDK installation to avoid warning message #17

@Aldaviva

Description

@Aldaviva
  1. Install a package like dotnet-sdk-8.0 version 8.0.401-0 from this repo. This happens both on initial installation and recurs on each minor/patch upgrade.
  2. Run a dotnet command like dotnet build in a project directory
  • Expected: build without warnings
  • Actual: yellow warning message An issue was encountered verifying workloads. For more information, run "dotnet workload update".
ben@pi3:~/HelloWorld $ dotnet build

Welcome to .NET 8.0!
---------------------
SDK Version: 8.0.401

Telemetry
---------
The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate, view the instructions: https://aka.ms/dotnet-https-linux

----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
An issue was encountered verifying workloads. For more information, run "dotnet workload update".
  Determining projects to restore...
  Restored /home/ben/HelloWorld/HelloWorld.csproj (in 951 ms).
  HelloWorld -> /home/ben/HelloWorld/bin/Debug/net8.0/HelloWorld.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:29.61

This does not break the build, and only really matters if you're trying to build a .NET app for Android, iOS, or Mac OS. Normal CLI programs build fine without this.

Note that the dotnet workload update command requires an Internet connection and superuser permissions to run.

Maybe dotnet workload update could be added to a post-installation script in the SDK .deb files?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions