'Why do I get '.exe is not compatible with the version of Windows you're running' regardless of how I build it and agent?

I wanted to do something similar to:

https://devsdaily.com/azure-devops-how-to-run-console-applications-on-azure-pipeline/

To run a little conversion tool.

But so far I am getting

"D:\a\1\s\MakeMasterMarkDown.exe is not compatible with the version of Windows you're running"

I've built the exe as above. The only thing (i think) I'm doing differently is that I'm doing it in .yaml.

I have recreated the project with a sample version of what I am trying to do here: https://dev.azure.com/ChrisPepperSandBox/Documentation/_git/Test?path=/azure-pipeline.yml

(which doesn't run because I don't wan't to pay for a parrallel pipeline on it, its a copy and paste of something I have from somewhere I cant share)

The codebase for the tool is also there: https://dev.azure.com/ChrisPepperSandBox/Documentation/_git/Documentation

Which is a .netcore3.1 project and I've tried it as a

  • 32bit
  • 64bit
  • Arm .exe :S (Which you can see in the test repo)

I have tried specifying the build agent as:

  • windows-latest
  • windows-2019
  • windows-2016

The exe runs locally as both 64 and 32 bit on my machine.

Am I missing anything obvious?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source