Updating The Legacy Pipeline for Visual Studio 2017
Filed under: #daxmusings #bizapps
With the upcoming April 2021 release, support for Visual Studio 2015 will be dropped. If you’re building your code using a build VM deployed from LCS, you’re using the legacy pipeline. You will have to manually update your build pipeline tasks to use the new version. The steps are fairly simple and outlined in this official docs article. I have a quick video on YouTube to walk you through this as well. There is one little flag that could trip you up, however.
There are two tasks in the pipeline that use MSBuild: the Build the solution and Database sync steps. Those have to be changed to use msbuild version “15” (yes, Visual Studio 2017 uses msbuild 15.0). There’s a third task towards the end that will execute any X++ unit tests you may have. Besides switching this to use Visual Studio 2017, you also need to update the parameters passed into the test console. Visual Studio 2015 was the last release to support automatically detecting any installed Visual Studio extensions. With Visual Studio 2017, it requires the path to any extensions (such as X++) you wish to use to be passed in explicitly. The build VM already has logic to find this installed path for you, and it will set an environment variable with this path. You have to change the console options to pass this path into the test console.
This command line is where there’s one potential issue. The command line specifies that the tests need to run “in isolation”. But there is also a checkbox to indicate you wish to run the tests in isolation. With Visual Studio 2017 it turns out that if you tell it twice that you want isolation, it will throw an error. So make sure you have the checkbox unchecked, and copy/pasted the command line with the /inisolation flag. That should do it.
Check out the YouTube video for a super quick walkthrough of the steps.
There is no comment section here, but I would love to hear your thoughts! Get in touch!