guibranco / MSBuild.Version.Target

🎯⚙️ Provides a NuGet package that adds functionality to your project to auto increment the version build and revision before every Debug build.
https://guibranco.github.io/MSBuild.Version.Target/
MIT License
5 stars 1 forks source link

Add support to use a single version file at solution level with gitauto model #27

Closed gitauto-ai[bot] closed 1 month ago

gitauto-ai[bot] commented 2 months ago

Original issue: #12

What is the feature

Add support to use a single version file at the solution level instead of having separate version files for each project.

Why we need the feature

Managing version numbers across multiple projects within a solution can be cumbersome and error-prone. By centralizing the version information in a single file, we can ensure consistency and simplify the version management process. This will also reduce the overhead of updating version numbers in multiple places, thereby minimizing the risk of discrepancies.

How to implement and why

  1. Create a Central Version File:

    • Add a new version file at the solution level, for example, SolutionVersion.txt.
    • This file will contain the version number that will be applied to all projects within the solution.
  2. Modify Build Scripts:

    • Update the build scripts to read the version number from SolutionVersion.txt.
    • Ensure that the version number is applied to all projects during the build process.
  3. Update Project Files:

    • Modify the project files to remove individual version numbers.
    • Ensure that the projects are configured to use the version number from the central file.
  4. Testing:

    • Test the build process to ensure that the version number is correctly applied to all projects.
    • Verify that the version number is consistent across all output artifacts.
  5. Documentation:

    • Update the README.md and any other relevant documentation to explain the new versioning process.
    • Provide instructions on how to update the version number in the central file.

By following these steps, we can streamline the version management process and ensure consistency across all projects within the solution. """

Files to be modified:

Test these changes locally

git checkout -b gitauto/issue-#12-1c540591-506e-4fc5-8ae8-d270905dfc5a
git pull origin gitauto/issue-#12-1c540591-506e-4fc5-8ae8-d270905dfc5a
AppVeyorBot commented 2 months ago

:white_check_mark: Build MSBuild.Version.Target 4.0.94 completed (commit https://github.com/guibranco/MSBuild.Version.Target/commit/b94e9a4553 by @gitauto-ai[bot])

AppVeyorBot commented 1 month ago

:white_check_mark: Build MSBuild.Version.Target 4.0.102 completed (commit https://github.com/guibranco/MSBuild.Version.Target/commit/ff349636d6 by @gstraccini[bot])

AppVeyorBot commented 1 month ago

:white_check_mark: Build MSBuild.Version.Target 4.0.107 completed (commit https://github.com/guibranco/MSBuild.Version.Target/commit/7d8194a5e7 by @gstraccini[bot])