Forum Discussion

MannHarpreet's avatar
MannHarpreet
Copper Contributor
May 25, 2023

Pipeline in Azure DevOps using .net project

How to build a new pipeline using TFVC code and working on .net project in Azure devops. Can I get the information in details?

1 Reply

  • Below the step by step on building a pipeline for .NET project using TFVC:

     

    1. Set Up Your Azure DevOps Project
    •    Go to Azure DevOps
    •    Create a new project or use an existing one

    2. Add Your .NET Code to TFVC
    •    Use Visual Studio to connect to Azure DevOps
    •    Map your workspace and check in your .NET solution to TFVC
    •    Organize your folders properly (e.g., /Main, /Build, /Libs, etc.)

    3. Create a Classic Build Pipeline
    Since TFVC is only supported in Classic pipelines:
    In Azure DevOps:
    •    Go to Pipelines > Builds
    •    Click New Pipeline
    •    Choose Use the classic editor
    •    Select your TFVC repository
    •    Choose your branch and click Continue

    4. Configure Build Steps

    Tasks to Add:
    1.    NuGet Restore 
    o    Restore packages from packages.config or .csproj
    2.    Build Solution 
    o    Use Visual Studio Build task
    o    Set the path to your .sln file
    3.    Run Tests
    o    Add Visual Studio Test task
    4.    Publish Artifacts 
    o    Use Publish Build Artifacts to output compiled binaries

    5. Set Triggers
    •    In the Triggers tab, enable Continuous Integration (CI) if you want the pipeline to run on every check-in
    •    Make sure your workspace mappings match the trigger filters

    6. Save and Queue the Pipeline
    •    Save your pipeline
    •    Click Queue to run it manually or wait for a CI trigger

Resources