none
API to deploy the release after changing parameters RRS feed

  • Question

  • Hi All,

    I am trying to use the TFS API's to automate the Release Deployment. Steps are we need to set the variable values and then Deploy the jobs. Now with the available options and community articles, I was able to set the variable values with the code below: 

    // Create a connection to TFS
    VssConnection connection = new VssConnection(new Uri(collectionUri), new VssBasicCredential("user", token));
    
    // Get the Release client and the release
    ReleaseHttpClient client = connection.GetClient<ReleaseHttpClient>();
    var release = client.GetReleaseAsync(projectName, releaseId).Result;
    
    // Update the release variable
    release.Variables["Variable1"].Value = "value";
    var updatedRelease = client.UpdateReleaseAsync(release, projectName, releaseId).Result;
    

    But I am not able to find any methods / ways to deploy the release in an environment. 

    Can someone help to see if there is any option to deploy the release via C# in a specific enviornment?

    Wednesday, February 14, 2018 3:28 PM

All replies

  • Hi jigarchhadwa,

    Welcome to MSDN forum.

    This forum is about MSuild (Discuss the Microsoft build engine aka MSBuild. Topics including: usage of MSBuild, build customization, and MSBuild extensibility via tasks, loggers and hosting.), as your question is more related to TFS, so I suggest that you can submit this question with a new thread on stackoverflow with TFS tag.

    Thanks for your understanding.


    MSDN Community Support Please remember to click Mark as Answer. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Thursday, February 15, 2018 7:17 AM