The macro ‘@CurrentIteration’ is not supported without a team context.

Today when writing release notes for my customers latest release I bumped into an issue. I have a query that returns all item in the current Iteration Path with their release notes. The release notes are written in Microsoft Word so I thought that if I could just get the query into Excel it would be an easy “Copy and Past” operation into word.

Fortunately Azure DevOps have just this feature. You simply go to queries, click the three dots negt to the query and select Open in Excel

My query looks like this:

In order to use Open in Excel you first need to install Azure DevOps Office® Integration 2019. After authenticating to Azure DevOps I got an error message… interresting

Turns out the setting @CurrentIteration does not work in Excel… You have to set it to the actual iteration path in order for the Excel Addin to work.

Good to go 🙂

The Azure DevOps UI for Build Pipelines has changed

A quick one today…

I was about to deploy a new package today for a customer… and I could not find it… Apparently the UI for DevOps has changed and it took me a while to find the same place.

The old UI looked like this. You went to Pipelines – Build – [your pipeline] – [The run you wanted] – Summary. Under Build Artifacts you could find the package zip.

Bildresultat för azure devops build pipeline package

Now it looks a bit different. You still go to Pipelines – Build – [your pipeline] – [The run you wanted] – Summary. You find the package artifacts here.

Oh… and there is also another difference. The package used to be ziped an extra time so you had to extract it to be able to upload it to LCS. Now you directly get the deployable package.

That’s it for today… mainly since I tend to forget 🙂

RSAT: Failed to download or overwrite attachment files – Some files maybe in use.

I had an issue today with one of my testcases in RSAT. When running it manyally from the RSAT UI it worked but when trying to run it from a PowerShell script I got this error:

Failed to download or overwrite attachment files – Some files maybe in use.

For some reason the test case uploaded duplicate files to Azure DevOps. When I ran the test in RSAT it uses the local file generated from RSAT and everything worked but when I ran it from the console it downloaded the files from DevOps, got the duplicates and for some reason failed.

The solution was to permanently delete the test case from DevOps and resync it from BPM.

Beware that that will give it another ID which will change the order of the tests.

Changing branches for a new sprint

In the project I am working on right now we are maintaining two release branches. One for sprint release and one for hotfixes. Every time we release a sprint we are re-targeting the the build pipelines to point to the new branches for the next sprint. This article is a short description for where you need to change path (mostly for me to remember):

  1. Log into Azure DevOps
  2. Go to Pipelines – Builds
  3. Select the Pipeline you want to change and click Edit
  4. Go to Get Sources and change the two fields under Server Path

  5. Select the workflow item called Build the solution and change to the correct path in Project

  6. Save the pipeline.

    Note that when you are looking at the pipeline you will not see the correct branch until you have actually run the build successfully once

That is it for today…

Johan

 

Setting up notifications in Azure DevOps

Today one of the test guys in our project asked if it was possible to get a notification when code was pushed to a specific branch in DevOps… specifically the branch that meant that they needed to test something… this is what you do:

  1. Login into Azure Devops and go to User Setting – Notifications
  2. Click New Subscription, choose Code (TFVC) and Code is checked in
    Note: since this is a Dynamics 365 FO project we are using TFVC 
  3. Set the Path (or other criteria) you want to check for and click finish

    That is all…

Johan

Link
https://docs.microsoft.com/en-us/azure/devops/boards/queries/alerts-and-notifications?view=tfs-2017

How to create a sprint

This is mostly a checklist for me to remember how to add new Sprints (Iteration Paths) in Azure DevOps… I tend to forget since it is not done very often

  1. Go to Project Settings in Azure DevOps
  2. In Project Confiruration choose the parent Iteration Path and click New Child
  3. Add Name, Start date and End Date and click Save and Close
  4. To mage the Sprint visible you need to add is to a team (otherwise noone will see it). To do this go to Team Configuration, choose Iterations and click Select Iterations.
  5. Choose the new sprint and click Save and Close

That is it for today… have a nice Monday

Johan

Links:
https://docs.microsoft.com/en-us/azure/devops/organizations/settings/set-iteration-paths-sprints?view=azure-devops&tabs=browser
https://docs.microsoft.com/en-us/azure/devops/organizations/settings/set-area-paths?view=azure-devops&tabs=browser#guidance

Issues compiling label files

Yesterday evening (why does it always have to be evenings 😉 ) I was going to do a deploy of code to our staging environment. I started the build in Azure Devops and it failed:

C:\DynamicsSDK\Metadata\Microsoft.Dynamics.AX.Application.Build.targets(78,5): error MSB6006: “LabelC.exe” exited with code -1. [C:\DynamicsSDK\Metadata\BuildMetadata.proj]

OK… SO LabelC.exe atleast gives me some hints and since the deployconsisted of changes to Label Files this was not too strange. I downloaded the log file and found this information:

outlog=C:\DynamicsSDK\VSOAgent\_work\10\Logs\ModelName\Dynamics.AX.ModelName.labelc.log

So I looked in the log file on the build server and found the following:

The error was duplicate lines in two label files

Remove them by editing the file in Azure DevOps and check in the file. Restart the build and it worked… Way