Ignoring TypeScript generated files from Git

22. April 2019 16:41 by Cameron in Git, javascript, TypeScript  //  Tags: , , , , , , ,   //   Comments

I recently started a project with TypeScript and found that the js and js.map files were being added to my repository. These files are automatically generated with each build of your TypeScript code so they're not needed in the repository. To remove these if you've already added them, run the following:

git rm src/**/**/*.js
git rm src/**/**/*.js.map

Following that, you can add these lines to your .gitignore to ensure they're not added back:

src/**/**/*.js
src/**/**/*.js.map

Configure Azure DevOps Pipelines for building WiX installers

5. April 2019 14:58 by Cameron in Continuous Integration, Programming  //  Tags: , , ,   //   Comments

Although the WiX installer toolset is installed on the default build agent in Azure DevOps, you need to tweak the VSBuild task some to make it work. Before I updated the VSBuild task, my builds were hanging and not finishing, wasting precious Azure DevOps Pipelines minutes. To remedy this, you need to edit your azure-pipelines.yml like so:

- task: VSBuild@1
  inputs:
    solution: '$(solution)'
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'
    msbuildArgs: '/p:RunWixToolsOutOfProc=true'

The important piece here is the msbuildArgs option on the VSBuild task. This allows the WiX tools to run outside of Visual Studio which is needed on the build agent. After your installer builds, you can then publish it as part of the build artifacts. Now as a result, you can always have up to date installers.

Month List

Tag cloud