Continuous Integration
Setup packaging within a continuous integration environment.
Last updated
Setup packaging within a continuous integration environment.
Last updated
You will need to include the MSBuild targets and assemblies in your repository in order to packaging during the build process.
The MSBuild assets are stored in the Visual Studio MSBuild directory when the extension is installed.
Your path to this folder may different based on your version and edition of Visual Studio. VSWhere can be used to determine this file location.
Place the files in a directory that you can link to during the build process. As an example, you can place them at the root of the repo.
Next, update the PSSProj file to import the targets file for PowerShell Tools for Visual Studio. Include a condition so the build still works locally. This should be placed at the bottom of the file after the existing import. If you placed the assets in a different location, you will need to update your path. The below example uses the SolutionDir MSBuild property to locate the directory of the solution file.
Finally, setup the Azure DevOps pipeline to run the VSBuild
target against the Solution Directory. This example uploads the compiled artifact after the build so it can be downloaded from the Azure DevOps portal.
Once the pipeline is complete, it should run automatically. If it hasn't you can run it manually and view the job output. The built binaries will be included under the related section.