Query on Net & ASP

Glenn Maxwell 12,871 Reputation points
2023-06-02T18:46:07.32+00:00

Hi All

i have outdated versions of .Net and ASP.Net. i have installed .dotnet core removal tool for the url https://github.com/dotnet/cli-lab/releases . What syntax should i use if i need to remove the below

.Net Cre SDK 3.1.413, .NET Core Runtimes 2.1.30, ASP.NET Core Runtimes: 3.1.19 x86,2.1.30 x64

C:\Program Files (x86)\dotnet-core-uninstall>dotnet-core-uninstall list
The versions that can be uninstalled with this tool are:
.NET Core SDKs:
  3.1.413  x64    [Used by Visual Studio 2019. Specify individually or use --force to remove]

.NET Core Runtimes:
  7.0.5   x64
  2.1.30  x64

ASP.NET Core Runtimes:
  7.0.5   x64
  3.1.19  x86
  2.1.30  x64

.NET Core Runtime & Hosting Bundles:

C:\Program Files (x86)\dotnet-core-uninstall>dotnet-core-uninstall remove 3.1
You must specify exactly one of: --aspnet-runtime, --hosting-bundle, --runtime, --sdk.


Developer technologies ASP.NET ASP.NET Core
Developer technologies .NET .NET Runtime
Developer technologies .NET Other
Developer technologies ASP.NET Other
{count} votes

Accepted answer
  1. Anonymous
    2023-06-05T07:22:53.3766667+00:00

    Hi @Glenn Maxwell

    is the below syntax correct. dotnet-core-uninstall remove --sdk 3.1 dotnet-core-uninstall remove --runtime 2.1 dotnet-core-uninstall remove --aspnet-runtime 2.1

    The commands are correct. But using the above command, it will show the yes/no confirmation.

    User's image

    If you want to remove the SDK and Runtime without requiring yes or no confirmation, you can use the following commands:

    To remove the SDK and Runtime via the .NET uninstall tool (dotnet-core-uninstall), the commands should like this:

    dotnet-core-uninstall remove [options] [<VERSION>...]
    

    For example: In my machine, I installed 2.1.818 SDK and 2.1.30 Runtime.

    User's image

    To remove the 2.1.818 version SDK, we can use dotnet-core-uninstall remove 2.1.818 --sdk --yes --verbosity q

    User's image

    To remove the 2.1.30 Runtimes, we can use dotnet-core-uninstall remove 2.1.30 --aspnet-runtime --yes --verbosity q

    The result as below:

    User's image

    More detail information about the commands, see .NET uninstall tool.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,

    Dillion

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Glenn Maxwell 12,871 Reputation points
    2023-06-02T21:52:57.29+00:00

    if at all if i need to remove, is the below syntax correct.

    dotnet-core-uninstall remove --sdk 3.1

    dotnet-core-uninstall remove --runtime 2.1

    dotnet-core-uninstall remove --aspnet-runtime 2.1

    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.