How can I prevent Vistual Studio uninstalling workloads that I'm currently using?

Tyco Kaine 1 Reputation point
2025-08-08T09:05:14.12+00:00

I have an issue when using Visual Studio where I can be in the middle of working on a project and then I without any warning I'll start getting build errors because a workload required for my project isn't installed.

Specifically this is usually wasm-tools-net8 or wasm-tools-net6.

This happens under me while I'm actually working on the project, so one time the project will build fine, and the next build a few mintues later it'll throw up this error saying the required workloads are not installed.

When this happens I then have to go to the command line and install these workloads, then restart my machine before the I can get my project to build again.

I think this is something to do with updates to Visual Studio or possible windows updates - but it's not clear why it should remove features that I'm in the middle of using and require me to manaually resintall them every single time.

Is there any way to flag these workloads as 'in use' so that they don't keep getting uninstalled?

Cheers,

Tim

Developer technologies | Visual Studio | Setup
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Susmitha T (INFOSYS LIMITED) 160 Reputation points Microsoft External Staff
    2025-08-11T10:11:09.28+00:00

    Hope you are doing good! Thank you for reaching out. Please find the answer below.

    1.Check Your Visual Studio Installation: Ensure you have the latest version of Visual Studio installed. Sometimes, having older versions can lead to compatibility issues that might cause workloads to be uninstalled during updates.

    2.Workloads via Visual Studio Installer: Visual Studio should not remove workloads that are in active use, but it could be related to how the application handles updates. Check your workload configuration: Go to Tools > Get Tools and Features. In the Visual Studio Installer, ensure the workloads you need (like wasm-tools-net8 or wasm-tools-net6) are checked and installed.

     

    3.Pin Your SDK Version: Use a global.json file in your project root to lock the SDK version:
    {
      "sdk": {
        "version": "8.0.100"
      }
    }

     

    4.Avoid Preview Versions: Stick to stable releases of Visual Studio unless you absolutely need preview features. Many workload issues are tied to preview builds.

     

    5.Monitor Workload Changes: Review the Visual Studio Activity Log to gather insights about when and why the workloads are being uninstalled. You can enable logging by launching Visual Studio with the devenv /log command and check the log file in %APPDATA%\Microsoft\VisualStudio<version>\ActivityLog.xml.

     

    6.Use CLI with Repair Option: If workloads disappear: Bash: dotnet workload install wasm-tools-net8 dotnet workload repair Then restart Visual Studio and your machine.

     

    7.Disable Automatic Updates (Optional): You can disable automatic updates in Visual Studio settings to prevent surprise removals. Just be aware this means you’ll need to manually check for security patches.

    For Visual Studio: Go to Tools > Options > Environment > Product Updates. Set it to "Notify me to install".
    For Windows: Go to Settings > Update & Security > Windows Update, and pause updates.

    If you still face problems, could you share a bit more information:

    Which version of Visual Studio are you using?
    Are there specific Windows updates that you’ve noticed coincide with these workload removals? Have you installed any extensions or third-party tools that might interact with your Visual Studio setup?

    If issue still persist after following all the steps, we’ll be happy to assist further if needed." Kindly mark the answer as accepted if the issue resolved".

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.