In some cases you may need to troubleshoot your azure devops tasks inside a job and get a more detailed output than the default. You can enable a detailed log output using predefined variables. In more detail you can use System.Debug and set it to true.
variables:
- name: System.Debug
value: true
By doing so you will get more debug messages as shown in the below screenshot.
In this article I will explain how one can automate their .NET applications development using Azure DevOps. For the sake of this example I created a simple Console Application targeting .NET Framework 6.
The code only includes the below line.
Console.WriteLine("Hello from Azure Devops!");
First things first, a Git repository will be needed for the CI procedure. I chose to use Azure DevOps repositories as it is integrated with Visual studio and can be used very quickly. By pressing Add to Source Control a dialog will appear to choose the organization and project on which the repository will be created. This will create a new repository and you should then commit and push your code to the repository using the UI of Visual Studio.
After the push, the repository will be created on Azure DevOps
I disabled the automatic triggers on the repository with pr and trigger to none and I used the latest ubuntu machine as the build agent.
If a specific version of .NET is required it should be included in the task UseDotNet@2.
The building of the project is done from the DotNetCoreCLI@2 task. It will search everything with the .csproj extension and build it using the Azure CLI.
The last task that I included will run the application from the debug output folder.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here:
Cookie Policy