0
votes

Since this morning I get this vague error on my Azure Devops. The log file isn't there and it used to work perfectly. It build automatically during the days and I have no problems creating the MSI.. I tried to set the debug = true in Azure Devops but can't see anything more.

Any ideas?

Unable to process command '##vso[task.addattachment type=Distributedtask.Core.Summary;name=Installer project errors;]C:\Users\Administrator\Desktop\VS Agent_work\1\b\BuildInstaller_Log_20190620151007.txt' successfully. Please reference documentation (http://go.microsoft.com/fwlink/?LinkId=817296)

Cannot upload task attachment file, attachment file location is not specified or attachment file not exist on disk An error occurred while running

DevEnv! Please review logfile BuildInstaller_Log_20190620151007.txt

2

2 Answers

1
votes

Visual Studio license was expired on the build server. This caused this awkward error message. Runs fine now

0
votes

The error message is generated in the PowerShell script for the BuildTask (DutchWorkz BuildInstaller 1.2.4 in our case) which you can inspect if you have access to the build agent. The error occurs because the log file, in your case "BuildInstaller_Log_20190620151007.txt" did not exist. It is a secondary error that masks the real error, which is that devenv refused to run and so did not even generate a logfile. In our case, it wrote the message "The license for Visual Studio has expired...." and some more to stdout (not stderr).

The DutchWorkz BuildInstaller buildTask captures the stdout and writes it to the console in its debug output.

To see the debug output, set the build variable "System.Debug" to true: Your Azure Devops page -> Pipelines -> Select the pipeline you are interested in -> Run Pipeline -> Variables -> System.Debug -> true -> Update -> back -> Run. Alternatively, Your Azure Devops page -> Pipelines -> Select the pipeline you are interested in -> Run Pipeline -> Enable Diagnostic Output -> Run.

The fix for the "license expired" issue is generally to log into the machine where the pipeline runs (virtual or not) as the user that runs the pipeline, run devenv interactively and enter the credentials again when it asks. Visual Studio Community may require you to do this from time to time; in our case, it seems to want renewal of the license every year.

People otherwise get the error

Unable to process command '##vso[task.addattachment type=Distributedtask.Core.Summary;name=<some name>;] <path>\<someFile.ext>' successfully

and in that case, the error is already obvious in this very output: There is a blank space before <path>\<someFile.ext>, and PowerShell does not like that. But in that case, the build task is written badly and its powershell script is wrong, the blank should be omitted.