Query on Net & ASP

Glenn Maxwell 10,146 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.


.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,370 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,161 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,254 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,119 questions
{count} votes

Accepted answer
  1. Zhi Lv - MSFT 32,011 Reputation points Microsoft Vendor
    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 10,146 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