MartinCostello.DotNetBumper
0.1.0
See the version list below for details.
dotnet tool install --global MartinCostello.DotNetBumper --version 0.1.0
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local MartinCostello.DotNetBumper --version 0.1.0
#tool dotnet:?package=MartinCostello.DotNetBumper&version=0.1.0
nuke :add-package MartinCostello.DotNetBumper --version 0.1.0
.NET Bumper โ๐ฆโคด๏ธโจ
[!NOTE] This project is currently experimental.
Overview
.NET Bumper is a .NET Global Tool to upgrade projects to a newer version of .NET.
Bumper helps you upgrade your .NET projects to a newer version by taking care of some of the steps required to move from one version to another. Bumper supports upgrading to both Long Term Support (LTS) and Standard Term Support (STS) versions of .NET, and the latest preview versions of .NET. ๐
Steps the tool can perform on your behalf include:
- Updating the .NET SDK version in
global.json
๐งโ๐ป - Upgrading the Target Framework of your project files โ๏ธ
- Upgrading .NET, ASP.NET Core and EFCore NuGet packages to the appropriate versions ๐ฆ
- Updating image tags in Dockerfiles ๐ณ
- Running
dotnet test
to validate the upgrade ๐งช
[!NOTE] Upgrades are made on a best-effort basis. You should always review the changes made by the tool and test any changes made to validate the upgrade.
Quick Start
To install the tool and upgrade a .NET 6 or later project to the latest Long Term Support (LTS) version of .NET, run the following command:
dotnet tool install --global MartinCostello.DotNetBumper
dotnet bumper .
Usage
For a full list of options, run dotnet bumper --help
.
An example of the output is shown below.
Examples
Upgrade a project to the current LTS version of .NET
dotnet bumper ~/projects/awesome-project
Upgrade a project to the latest version of .NET
dotnet bumper ~/projects/awesome-project --upgrade-type Latest
Upgrade a project to the preview version of .NET
dotnet bumper ~/projects/awesome-project --upgrade-type Preview
Upgrade a project to a specific version of .NET
dotnet bumper ~/projects/awesome-project --channel 8.0
Upgrade a project to the current LTS version of .NET and then run
dotnet test
after the upgrade has completed
dotnet bumper ~/projects/awesome-project --test
Options
> dotnet bumper --help
Upgrades projects to a newer version of .NET. 0.1.0
Usage: dotnet bumper [options] <ProjectPath>
Arguments:
ProjectPath The path to directory containing a .NET 6+ project to be upgraded. If not specified, the
current directory will be used.
Options:
-v|--verbose Show verbose output
--version Show version information.
-?|-h|--help Show help information.
-c|--channel <CHANNEL> The .NET release channel to upgrade to in the format "major.minor".
-t|--upgrade-type <TYPE> The type of upgrade to perform.
Allowed values are: Lts, Latest, Preview.
-test|--test Test the upgrade by running dotnet test on completion.
-e|--warnings-as-errors Treat any warnings encountered during the upgrade as errors.
Pre-requisites
- .NET 8 must be installed to use the tool
- The .NET SDK version to upgrade to must also be installed if this is different
- The dotnet-outdated .NET Global tool must also be installed
- Any project being upgraded must already target at least .NET 6
Building and Testing
Compiling the application yourself requires Git and the .NET SDK to be installed.
To build and test the application locally from a terminal, run the following set of commands:
git clone https://github.com/martincostello/dotnet-bumper.git
cd dotnet-bumper
dotnet tool restore
./build.ps1
Feedback
Any feedback or issues can be added to the issues for this project in GitHub.
Repository
The repository is hosted in GitHub: https://github.com/martincostello/dotnet-bumper.git
License
This project is licensed under the Apache 2.0 license.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
This package has no dependencies.
Version | Downloads | Last updated |
---|---|---|
0.8.3 | 515 | 9/23/2024 |
0.8.2 | 142 | 9/20/2024 |
0.8.1 | 159 | 9/13/2024 |
0.8.0 | 238 | 8/15/2024 |
0.7.3 | 228 | 7/31/2024 |
0.7.2 | 151 | 7/11/2024 |
0.7.1 | 175 | 6/28/2024 |
0.7.0 | 394 | 5/21/2024 |
0.6.2 | 201 | 5/9/2024 |
0.6.1 | 174 | 5/7/2024 |
0.6.0 | 429 | 4/22/2024 |
0.5.3 | 487 | 4/15/2024 |
0.5.2 | 209 | 4/5/2024 |
0.5.1 | 151 | 4/4/2024 |
0.5.0 | 188 | 4/2/2024 |
0.4.1 | 8,721 | 3/27/2024 |
0.4.0 | 234 | 3/22/2024 |
0.3.3 | 213 | 3/11/2024 |
0.3.2 | 176 | 3/8/2024 |
0.3.1 | 132 | 3/7/2024 |
0.3.0 | 176 | 3/5/2024 |
0.2.1 | 266 | 2/29/2024 |
0.2.0 | 191 | 2/27/2024 |
0.1.1 | 198 | 2/22/2024 |
0.1.0 | 1,244 | 2/20/2024 |
See https://github.com/martincostello/dotnet-bumper/releases for details.