dotnet-clean Documentation

A guided tool will be provided to enable the controlled clean up of a system such that only the desired versions of the Runtime and SDKs remain.

780 stars C# C# 4 files Β· ~2,790 tokens
RAW Doc

Technical Documentation: dotnet/dotnet-clean

ℹ️ Provenance: Multi-Tier Ingestion Β· CodeWiki Reference

Overview (`README.md`)

Uninstall Tool: `dotnet-core-uninstall`

This repo contains the dotnet-core-uninstall tool, a command line tool for uninstalling versions of the .NET Core SDK, Runtime, ASP.NET Core Runtime, and Hosting Bundles. For more information about the use of this tool, see the docs here. To download the latest version of the tool, see the releases page.

Why isn’t the .NET Core Uninstall Tool a .NET Core Global Tool?

An early prototype of the .NET Core Uninstall Tool was a .NET Core Global Tool. Since .NET Core Global Tools are runtime-dependent applications they use a version of the .NET Core Runtime that is installed on the machine. The purpose of the tool is to uninstall arbitrary .NET Core SDKs and Runtimes, so may attempt to uninstall the version that’s running the current process. When this happened, we didn’t find a way to recover from the error and uninstall other SDKs and Runtimes. We saw this as particularly problematic because users might not be clear what runtimes are in SDKs that are being uninstalled or which runtime is currently being used.

Contributing

We welcome you to try things out, file issues, make feature requests and join us in design conversations.

Building the Repository

Run the build script at the root of the repo (build.sh or build.cmd) and provide a runtime identifier (for example, on windows run build /p:RID=win-x86)

.NET Foundation

The dotnet-core-uninstall tool is a .NET Foundation project. See the .NET home repo to find other .NET-related projects.

Code of Conduct

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information, see the .NET Foundation Code of Conduct.

License

.NET Core (including this repo) is licensed under the MIT license.


Overview (`eng/common/README.md`)

Don't touch this folder

text
uuuuuuuuuuuuuuuuuuuu
          u" uuuuuuuuuuuuuuuuuu "u
        u" u$$$$$$$$$$$$$$$$$$$$u "u
      u" u$$$$$$$$$$$$$$$$$$$$$$$$u "u
    u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u
  u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u
u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u
$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $
$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $
$ $$$" ... "$...  ...$" ... "$$$  ... "$$$ $
$ $$$u `"$$$$$$$  $$$  $$$$$  $$  $$$  $$$ $
$ $$$$$$uu "$$$$  $$$  $$$$$  $$  """ u$$$ $
$ $$$""$$$  $$$$  $$$u "$$$" u$$  $$$$$$$$ $
$ $$$$....,$$$$$..$$$$$....,$$$$..$$$$$$$$ $
$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $
"u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u"
  "u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u"
    "u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u"
      "u "$$$$$$$$$$$$$$$$$$$$$$$$" u"
        "u "$$$$$$$$$$$$$$$$$$$$" u"
          "u """""""""""""""""" u"
            """"""""""""""""""""

!!! Changes made in this directory are subject to being overwritten by automation !!!

The files in this directory are shared by all Arcade repos and managed by automation. If you need to make changes to these files, open an issue or submit a pull request to https://github.com/dotnet/arcade first.


Overview (`src/dotnet-core-uninstall/README.md`)

dotnet-core-uninstall

This project is a standalone uninstaller for Windows and MacOS. It exists partially to ensure that a) it's easy to uninstall the SDK and b) SDKs that are required by various VS versions aren't also uninstalled.

Releasing the tool

To release the tool, you need to do the following:

  • bump the version of the tool in eng/Versions.props
  • send a PR with this change and get it merged
  • wait for the associated build pipeline in VSTS to complete
  • get the version generated from the build pipeline and use it to create a tag in git
  • use that tag to create a github release. Add release notes with
    • A list of changes from the last release
    • The install instructions, which are included below
    • The 4 primary assets for the repo:
      • Windows MSI from VSTS pipeline
      • macOS tar.gz from VSTS pipeline
      • Source code (zip) generated by GitHub at time of release creation
      • Source code (tar.gz) generated by GitHub at time of release creation

Release notes template

Changes

Installation Instructions:

On Windows:

  1. Download the msi file below.
  2. Double click the msi file to install.
  3. Open a new command prompt.
  4. Check out the docs at https://aka.ms/dotnet-core-uninstall-docs
  5. Run the tool by using dotnet-core-uninstall.
  6. If you accidentally mess up your Visual Studio installation, use "Repair" in the Visual Studio installer.

On macOS:

Download the tar.gz file below.
Open terminal and change working directory to the directory with dotnet-core-uninstall.tar.gz.
Use the following commands to install the tool and show help:

shell
mkdir -p ~/dotnet-core-uninstall
tar -zxf dotnet-core-uninstall.tar.gz -C ~/dotnet-core-uninstall
cd ~/dotnet-core-uninstall
./dotnet-core-uninstall -h

Src Dotnet Core Uninstall Docs RELEASE PROCESS (`src/dotnet-core-uninstall/docs/RELEASE_PROCESS.md`)

Release Process for dotnet-core-uninstall Tool

This document outlines the complete release process for the dotnet-core-uninstall tool.

Prerequisites

Before starting the release process, ensure you have:

  • Access to the internal Azure DevOps pipeline dotnet-cli-lab
  • Permissions to create releases on the GitHub releases page

Release Steps

1. Identify the Build

  1. Navigate to the internal Azure DevOps pipeline named dotnet-cli-lab
  2. Locate the build you want to release
    • Ensure the build has completed successfully
    • Verify all build artifacts are available
    • Note the build number for reference

2. Collect Installer Artifacts

From the selected build's artifacts node, grab the installer links for:

  • macOS ARM64: drop-osx-arm64 artifact containing the .tar.gz file
  • macOS x64: drop-osx-x64 artifact containing the .tar.gz file
  • Windows MSI: drop-windows artifact containing the .msi file

Important: Copy the direct links to these artifacts for the next steps.

3. Vendor Team Handoff for Manual Signoff

  1. Send the installer links to the vendor team for manual signoff
  2. Wait for confirmation from the vendor team that all artifacts have been reviewed and approved
  3. Address any issues or concerns raised during the signoff process

4. Determine the Version Number

The version number for the release can be found in the build's binary log (binlog):

  1. Download the binlog from the build artifacts
  2. Open the binlog file using a binlog viewer
  3. Locate the version information (format: Major.Minor.6-digit-patch, e.g., 1.7.661902)
  4. Record this version number for the next steps

5. Create a Git Tag

Create a git tag matching the version number from the build:

bash
# Checkout the commit that was built
git checkout <commit-sha-from-build>

# Create and push the tag
git tag <version>
git push origin <version>

Example:

bash
git checkout abc1234
git tag 1.7.661902
git push origin 1.7.661902

6. Create a Draft Release on GitHub

  1. Go to the GitHub releases page
  2. Click "Draft a new release"
  3. Copy content from the most recent release as a template

7. Update the Release Details

Update the following in the draft release:

a. Release Title

  • Update the title to match the version number (e.g., "dotnet-core-uninstall v1.7.661902")

b. Tag

  • Select or enter the tag you created in Step 5 (e.g., 1.7.661902)
  • Ensure the tag points to the correct commit from the build

c. Release Notes

Update the release notes to include:

  • A summary of what's being fixed or changed in this release
  • List of notable bug fixes
  • List of new features (if any)
  • Any breaking changes or important notices

Update the commit diff link to compare the previous release tag to the new release tag:

text
**Full Changelog**: https://github.com/dotnet/cli-lab/compare/<previous-tag>...<new-tag>

Example:

text
**Full Changelog**: https://github.com/dotnet/cli-lab/compare/1.6.123456...1.7.661902

e. Upload Artifacts

Attach the following artifacts to the release:

  • Windows MSI file (from drop-windows artifact)
  • macOS ARM64 tar.gz file (from drop-osx-arm64 artifact)
  • macOS x64 tar.gz file (from drop-osx-x64 artifact)

GitHub will automatically generate source code archives (zip and tar.gz).

8. Get Review

  1. Save the draft release (do not publish yet)
  2. Share the draft release link with the team for review
  3. Request review from at least one team member with release permissions
  4. Address any feedback on the release notes or artifacts

9. Publish the Release

Once the review is approved:

  1. Return to the draft release
  2. Make any final adjustments based on review feedback
  3. Click "Publish release"
  4. Verify the release appears on the releases page
  5. Notify relevant stakeholders that the release is live

Post-Release Verification

After publishing:

  1. Verify the release appears correctly on the releases page
  2. Test downloading and installing artifacts from at least one platform
  3. Update any related documentation or announcements
  4. Monitor for any issues reported by early adopters

Notes

  • Always use the version format Major.Minor.6-digit-patch (e.g., 1.7.661902)
  • Keep release notes clear and user-focused
  • Ensure all artifacts are properly signed before release
  • Maintain consistency in release note formatting with previous releases

Troubleshooting

Build artifacts are missing

  • Check that the build completed successfully in the pipeline
  • Verify you have the correct permissions to access the artifacts
  • Contact the build team if artifacts are not being generated

Tag already exists

  • Use git tag -d <tag> to delete the local tag
  • Use git push origin --delete <tag> to delete the remote tag
  • Recreate the tag with the correct commit

Release notes are unclear

  • Reference previous releases for formatting examples
  • Focus on user-facing changes
  • Include links to issues or PRs for detailed information

Additional Resources


--- METRICS ---