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

dotnet image throws warning about stale workloads #1303

Open
seesharprun opened this issue Feb 12, 2025 · 4 comments
Open

dotnet image throws warning about stale workloads #1303

seesharprun opened this issue Feb 12, 2025 · 4 comments
Assignees

Comments

@seesharprun
Copy link
Contributor

Everytime I build a .NET project using the .NET SDK in the devcontainers/dotnet image, I get the same error message:

An issue was encountered verifying workloads. For more information, run "dotnet workload update".

This error message leads me to believe that the workloads on the SDK are stale in some way. I've tried running the mentioned command in the devcontainer's lifecycle, but it doesn't always consistently clear the error message. Is this something that can be fixed in the base image or is there a specific lifecycle step where I should run dotnet workload update.

Here's related issues in the .NET repositories:

@Mathiyarasy
Copy link
Contributor

Hello @seesharprun

Thank you for raising the issue.

Could you please share the few more details on devcontainer.json and dotnet image and your project sample setup to reproduce the issue.

@Mathiyarasy Mathiyarasy self-assigned this Feb 13, 2025
@seesharprun
Copy link
Contributor Author

This happens to me any time I use this image in a devcontainer, but you can see a running example by opening this repo in GitHub Codespaces:

https://github.com/azurecosmosdb/quickstart-nosql-dotnet

Devcontainer: https://github.com/AzureCosmosDB/quickstart-nosql-dotnet/blob/main/.devcontainer/devcontainer.json#L2

@Mathiyarasy
Copy link
Contributor

Thank you. I could repro the issue.

But i do not get it everytime i run the build command. I could see the warning message the first time i run the dotnet buildcommand.
If i run the dotnet build command again I could not see the issue. And also When i run the sudo dotnet build command it works even the first time without issues.

Checking on this further. Will update you after completing the analysis.

@seesharprun
Copy link
Contributor Author

Thanks! I tried to fix this by running dotnet workloads update as part of the container's lifecycle so it was pre-baked, but that didn't always consistently work.

I'm not against running dotnet build whenever the container starts, but it would be great if there was a best practice here or a way to prevent the warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants