Skip to content

Commit

Permalink
Use the new officially supported way to roll forward dotnet global tools
Browse files Browse the repository at this point in the history
Implemented in [dotnet tool run and install roll-forward option][1].

Supported [since the .NET SDK v8.0.300][2].

Documented in [
.NET tool roll-forward][3].

[1]: dotnet/sdk#37231
[2]: dotnet/sdk@dc2a5fe
[3]: https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-9/sdk#net-tool-roll-forward
  • Loading branch information
0xced committed Jul 8, 2024
1 parent 1b2d5fc commit b5979b0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
"version": "0.0.1-preview.304",
"commands": [
"dotnet-validate"
]
],
"rollForward": true
},
"dotnet-stryker": {
"version": "4.0.6",
"commands": [
"dotnet-stryker"
]
],
"rollForward": true
}
}
}
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/global",
"sdk": {
"version": "8.0.100",
"version": "8.0.300",
"allowPrerelease": false,
"rollForward": "latestFeature"
}
Expand Down
2 changes: 1 addition & 1 deletion src/Serilog.Formatting.Log4Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<Target Name="ValidateNuGetPackage" AfterTargets="Pack">
<!-- For reference: the file `.config/dotnet-tools.json` was created by running `dotnet new tool-manifest && dotnet tool install dotnet-validate` -->
<Exec Command="dotnet tool restore" />
<Exec Command="dotnet validate package local $([MSBuild]::EnsureTrailingSlash($(PackageOutputPath)))$(PackageId).$(PackageVersion).nupkg" EnvironmentVariables="DOTNET_ROLL_FORWARD=LatestMajor" />
<Exec Command="dotnet validate package local $([MSBuild]::EnsureTrailingSlash($(PackageOutputPath)))$(PackageId).$(PackageVersion).nupkg" />
</Target>

</Project>

0 comments on commit b5979b0

Please sign in to comment.