question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support installing workloads in user folder

See original GitHub issue

Currently, workloads are installed in the dotnet root folder. We should also support installing them into a different, user-local folder. Benefits would include:

  • Support source-built .NET.
    • The fallback workaround for source-built .NET would involve manually extracting various packages to specific folders, and setting some environment variables to tell the .NET SDK to load workloads from those folders.
  • Support installing workloads in Docker containers, where there are not permissions to write to the dotnet root folder
  • Better support for .NET SDKs installed via a package manager such as rpm or apt. Currently we expect that you will be able to install workloads in this case via sudo, but it may be an anti-pattern to elevate permissions to write to a folder that is owned by a package manager.

However, we do need to make sure to consider the security implications of having a root-installed .NET SDK load workloads which are installed with non-root permissions.

It’s also possible that we want to represent workloads themselves as packages managed by rpm or apt. In this case we might not need to also support installing packages to user folders. (However, for this to work, we would need to be able to source-build all workloads available on Linux in order to make them available to source-built .NET as source-built packages).

Once we have settled on this as the right approach and reviewed the security implications, we should schedule this work as soon as we are able after the currently committed .NET 6 workloads work. The current estimate is 6.0.200 though we should start as soon as we can.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
dsplaistedcommented, Jun 7, 2021

FYI @tmds @omajid, I’ve filed this issue based on our discussion last week.

1reaction
tmdscommented, Jun 9, 2021

I think consuming the workloads from a user folder is as secure as consuming them from an administrator installed .NET root folder.

In both cases they are as trustworthy as the user.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Modify Visual Studio workloads, components, & language ...
Prerequisites; Launch the installer to modify your installation; Change workloads or individual components; Modify language packs; Support ...
Read more >
Workloads download/install paths problem
the workloads apparently installed on C and when i checked VS installer the download path is D which i selected for my VS...
Read more >
dotnet workload install command - .NET CLI
Optional workloads can be installed on top of the .NET SDK to provide support for various application types, such as .NET MAUI and...
Read more >
[6.0] create file to trigger user local workload installation
For source-build to install workloads into a user folder we need a file in ... If you have write-permissions please help me learn...
Read more >
workload-installation.md
The same dotnet folder may have different versions of the SDK installed by ... For that case, we support installing workloads to a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found