Open KimBon opened 4 years ago
@KimBon the GetSolution should get you the version if needed.
Most people do this the other way around actually, use the build number to set the solution version, so each time there is a new build, the solution version is updated.
@WaelHamze Indeed we have been playing with GetSolution too.
In case of a build pipeline that exports and unpacks the solution, you could first set the version on the source environment based on the build number. However, for a actual release (eg sprint release), you might want to start from the checked in solution package? If you pack that solution, you want to rely on the solution version which is stated in the checked-in solution.xml?
We increment the revision part of the solution version during each nightly build. In a release build, we now set the build number manually during the merge of our develop into release branch. How would you approach this normally?
@KimBon the versioning it a tricky one and it will depend on your process. Have you considered storing the version number in the library (variable group), You can then manage this independently from builds and environments and update manually if needed or during build.
@WaelHamze we have tried several approaches:
I assume approach 2 is what you meant with your previous comment: "Most people do this the other way around actually, use the build number to set the solution version, so each time there is a new build, the solution version is updated."?
I use GitVersion to semi-automate the build numbers.
We are implementing Azure DevOps build and release automation on one of our D365CE projects, partly based on your tools. For version numbering, we are looking for a good way to track our deployments. We are thinking of extracting the version number from the solution.xml file via PowerShell script and pushing it as the Pipeline's Build Number. Not sure if this is a good practice or what could be the better alternative?
@WaelHamze Anyway, this could be a new task GetVersion (or an extension for GetSolution) and work the same way as MSCRM Set Version. If this is useful, in which project should this be added? Its a bit confusing in which project this should happen: xrm-ci-framework and dyn365-ce-vsts-tasks. What's the difference for these?