Requirements: I have been using Azure DevOps' Pipelines pipelines to compile ASP.NET Core projects, .NET Core projects are very simple to compile with dotnet, and can be compiled directly with the .NET SDK command line, but ASP.NET MVC (.NET Framework) projects need to be compiled with msbuild. This article uses Azure DevOps callsVSBuild@1Compile ASP.NET MVC (.NET Framework) project.
Review:
We use Azure DevOps Services for demonstrations, firstHost an upload of a .NET Framework 4.7.2 projectand then enter the project, as shown below:
The MVC project references a class library, which in turn references a nuget package for testing, and the MVC controller calls the method in ClassLibrary1.
To create a pipeline, click: Pipelines -> Create Pipeline, as shown in the following figure:
Select Azure Repos Git Next, select the Git project, go all the way to the next step, select ASP.NET Core (.NET Framework), save it, and then modify the pipeline azure-pipelines.yml configuration file.
For more information about Azure Pipelines task configuration, please refer to:The hyperlink login is visible.
Modify the azure-pipelines.yml profile,The agent is used on my local computerAs follows:
Then, run the pipeline, and the first time you run the pipeline, it will prompt that authorization is required, as shown in the following figure:
Granting permission here will permit the use of Agent pool 'Default' for all waiting and future runs of this pipeline.
View the execution results as shown in the figure below:
Download the release package as shown below:
Reference:
The hyperlink login is visible.
The hyperlink login is visible.
|