dotnet-version-cli icon indicating copy to clipboard operation
dotnet-version-cli copied to clipboard

support Directory.Build.props at top level (where .git is) automatically

Open 4xmg opened this issue 4 months ago • 0 comments

Support for .targets was added 2021. But MS current recommendation is to place <VERSION> in Directory.Build.props, which .csproj auto-include and CAN override.

  1. .props should be supported, or better yet, the code (which is a one line to test for .csproj/.targets) should see if the file is XML with tag.
  2. Directory.Build.props, if exist at top level and 'dotnet version' run at top level (where .git is) should be used automatically (no -f required)

more info on Directory.Build.props: https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory?view=vs-2022

4xmg avatar Aug 14 '25 10:08 4xmg