Skip to content

Allow for automatic workload installation by specifying required workloads in global.json #45216

Open
@just-ero

Description

@just-ero

Problem Description

Currently, it is not possible to automate the installation of a required workload for projects. It would be good to not have to remind contributors to a project to run dotnet workload install <workload> before they can build.

The feature would additionally be useful for CI jobs, which would no longer have to manually install required workloads.

Proposed Solution

An entry in the global.json file specifying the required workloads (and, potentially, their version) which the SDK then picks up on and installs before a restore/build would be ideal:

{
  "sdk": {
    "version": "8.0.404"
  },
  "workloads": ["wasi-experimental"]
}

or:

{
  "sdk": {
    "version": "8.0.404"
  },
  "workloads": {
    "wasi-experimental": {
      "version": "8.0.404"
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions