A Step-by-Step Guide to Upgrade Dynamics 365 F&O Version in DevOps Build Pipeline
Farman Ameer
Microsoft Dynamics AX | D365 F&O Technical Consultant | Dot Net | Angular | DevOps
In this blog, I will demonstrate how to upgrade the Microsoft Dynamics 365 Finance and Operations application version in a build pipeline. Specifically, I will be upgrading from version 10.0.39 to 10.0.41.
From version 10.0.40, the Application package has been replaced by two packages
Microsoft.Dynamics.AX.Application1.DevALM.BuildXpp
Microsoft.Dynamics.AX.Application2.DevALM.BuildXpp
While the other packages are
Microsoft.Dynamics.AX.ApplicationSuite.DevALM.BuildXpp
Microsoft.Dynamics.AX.Platform.CompilerPackage
Microsoft.Dynamics.AX.Platform.DevALM.BuildXpp
2. Select the package and click the 'Pick' button to add it to the Asset Library.
3. Download the NuGet packages recently added to the Asset Library and save them in the folder containing the old NuGet files, replacing the existing files.
4. Open PowerShell in 'Run as Administrator' mode within the folder containing the nuget.exe file, and execute the following commands one by one. These commands will upload the NuGet packages to Azure Artifacts.
领英推荐
nuget.exe push -Source "YourKey" -ApiKey az Microsoft.Dynamics.AX.Application1.DevALM.BuildXpp.nupkg
nuget.exe push -Source "YourKey" -ApiKey az Microsoft.Dynamics.AX.Application2.DevALM.BuildXpp.nupkg
nuget.exe push -Source " YourKey " -ApiKey az Microsoft.Dynamics.AX.ApplicationSuite.DevALM.BuildXpp.nupkg
nuget.exe push -Source " YourKey " -ApiKey az Microsoft.Dynamics.AX.Platform.CompilerPackage.nupkg
nuget.exe push -Source " YourKey " -ApiKey az Microsoft.Dynamics.AX.Platform.DevALM.BuildXpp.nupkg
You can see your uploaded nuget packages under 'Artifacts' on Azure DevOps, It will show like this :
5. After uploading the NuGet files to Azure Artifacts, update the version of the NuGet files in the packages.json file located in the Build Pipeline folder within your local source control directory. Since Microsoft has divided the Application package into two separate packages, Application1 and Application2, replace the reference to the single Application package with these two newly added packages. Ensure that the package versions in the packages.json file match the versions specified in the Asset Library
6. Version can be verified from LCS by selecting package
7. Checkin your packages.json file to your repository.
8. Next, open Azure DevOps and edit the pipeline. Under the 'Build Solution' step, add the following arguments to the 'MSBuild Arguments' field
/p:BuildTasksDirectory="$(NugetsPath)\$(ToolsPackage)\DevAlm" /p:MetadataDirectory="$(MetadataPath)" /p:FrameworkDirectory="$(NuGetsPath)\$(ToolsPackage)" /p:ReferenceFolder="$(NuGetsPath)\$(PlatPackage)\ref\net40;$(NuGetsPath)\Microsoft.Dynamics.AX.Application1.DevALM.BuildXpp\ref\net40;$(NuGetsPath)\Microsoft.Dynamics.AX.Application2.DevALM.BuildXpp\ref\net40;$(NuGetsPath)\$(AppSuitePackage)\ref\net40;$(MetadataPath);$(Build.BinariesDirectory)" /p:ReferencePath="$(NuGetsPath)\$(ToolsPackage)" /p:OutputDirectory="$(Build.BinariesDirectory)"
Here I have replaced Application Package reference with to ‘Application1 Build Reference’ and ‘Application2 Build Reference’.
9. Save and run the Pipeline. Once completed, verify the build package.