Open
Description
opened on Jun 13, 2022
Hello all,
Since dotnet-format is now a part of the SDK it potentially poses an issue when upgrading the sdk might potentially change the behaviour of the tool, e.g. new rules are pickled up or introduced.
Is there a way to pin the version of the tool now? It's especially important in case of the CI/CD environment in multi-version product companies where reproducible builds are important (think patch releases for older builds).
Before the tool was moved to the sdk one could pin it in such a way:
Add .config/dotnet-tools.json
in the root of your repository with the following contents
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-format": {
"version": "5.1.250801",
"commands": [
"dotnet-format"
]
}
}
}
During the CI run something like
dotnet tool restore
dotnet tool run dotnet-format $ARGS
Is there a way to achieve similar behaviour with the current setup?
Thanks!
Metadata
Assignees
Labels
No labels
Activity