Issue in Azure Pipeline

Durgarao Undi 0 Reputation points
2024-05-28T10:58:34.2166667+00:00

Purpose:

The provided Azure Pipeline YAML file automates the process of building, restoring, and publishing a .NET project using Azure DevOps. It ensures that all required dependencies are installed and that the build artifacts are correctly published to a specified directory.

Key Components:

Trigger:

  • Specifies the pipeline to run when changes are pushed to the master branch. Pool:
  - Specifies that the pipeline should run on the latest Windows virtual machine.

  
  **Variables**:

  
     - **`buildConfiguration`**: Set to **`Release`** to indicate the build configuration.

     
        - **`artifactStagingDirectory`**: Specifies where the build artifacts will be staged.

        
        **Steps**:

        
           - **Install .NET SDK**: Uses **`UseDotNet@2`** to install the .NET SDK version 8.x.

           
              - **Install .NET Framework 4.6.1 Developer Pack**: Uses a PowerShell script to install the developer pack using Chocolatey.

              
                 - **Install NuGet Tool**: Uses **`NuGetToolInstaller@1`** to install a specific version of NuGet.

                 
                    - **Restore NuGet Packages**: Uses **`NuGetCommand@2`** to restore all NuGet packages in the solution.

                    
                       - **Restore .NET Packages**: Uses **`DotNetCoreCLI@2`** to restore .NET project dependencies.

                       
                          - **Build .NET Projects**: Uses **`DotNetCoreCLI@2`** to build the projects.

                          
                             - **Publish .NET Projects**: Uses **`DotNetCoreCLI@2`** to publish the projects to the artifact staging directory.

                             
                                - **Verify Artifact Staging Directory**: Uses a PowerShell script to ensure the artifact staging directory exists and logs its contents.

                                
                                   - **Log Working Directory**: Uses a PowerShell script to log the current working directory and its contents.

                                   
                                      - **Publish Build Artifacts**: Uses **`PublishBuildArtifacts@1`** to publish the artifacts to the specified location.
```Issue Description:

The pipeline faces an issue where it reports a **`ENOENT: no such file or directory, scandir 'D:\a\1\a\AutoSquared.UiPath.Activities'`** error. This error indicates that the specified directory does not exist at the time the pipeline tries to access it.
Azure IoT Operations
Azure IoT Operations
Azure IoT Operations is a set of modular services enabled by Azure Arc.
14 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Cameron 502 Reputation points
    2024-05-28T11:17:17.0466667+00:00

    I don't think your question has rendered correctly so it is difficult to read but I think you want to know why this is happening:
    The pipeline faces an issue where it reports a ENOENT: no such file or directory, scandir 'D:\a\1\a\AutoSquared.UiPath.Activities' error. This error indicates that the specified directory does not exist at the time the pipeline tries to access it.

    It seems fairly straightforward that you are trying to access 'D:\a\1\a\AutoSquared.UiPath.Activities' and it does not exist. That directory is for build artifacts, you might have built something but not published or copied it so it cannot be used subsequently.

    Hope that helps.