Skip to content

End of milestone procedure

Arnaud Declercq edited this page Jun 26, 2024 · 9 revisions
  1. Create the project for the new upgrader (as a console application on .NetFramework4.7.2)
    • Add reference to the PostBuild and BHoMUpgrader projects
    • Make sure you fill in the assembly info
    • Set the build folder to Build\ - ensure this is done for both debug and release configurations
    • Copy the Converter.cs file from a previous version and delete all the private methods. In the constructor, only keep the assignment of the property PreviousVersion (make sure you correct it). Also correct the namespace.
    • Copy the Upgrades.json file from the previous version and delete any potential versioning it contains.
    • Copy the Program.cs file from a previous version. make sure to correct the namespace.
    • In post build, add those lines (where XX is the current version number):
xcopy /Y /I /E "$(TargetDir)*.dll" C:\ProgramData\BHoM\Upgrades\BHoMUpgraderXX
xcopy /Y /I /E "$(TargetDir)BHoMUpgraderXX.exe" C:\ProgramData\BHoM\Upgrades\BHoMUpgraderXX
call "$(TargetDir)PostBuild.exe" ..\..\..\ "C:\ProgramData\BHoM\Upgrades"

DO NOT COMPILE THE TOOLKIT UNTIL AFTER STEP 2 BELOW - YOU WILL END UP WITH AN UPGRADES FILE USING VERSIONING INFORMATION FROM YOUR OWN MACHINE IF YOU DO WHICH MAY NOT REFLECT THE BETA

  1. Freeze current version

    • Copy the Upgrades.json of the current upgrader from ProgramData/BHoM/Upgrades into the one inside that upgrader project.
    • Ensure the CopyToOutputDirectory setting is set to Copy Always for this Upgrades.json file (in the properties of the file itself).
    • In post-build: delete the call to PostBuild and replace it with xcopy /Y /I /E "$(TargetDir)Upgrades.json" C:\ProgramData\BHoM\Upgrades\BHoMUpgraderXX where XX is the current version number
    • Remove the dependency to PostBuild (it's a project dependency)
  2. Update AssemblyFileVersion of

    • BHoMUpgrader
    • PostBuild
Clone this wiki locally