TFS vNext build and access to User Capabilities

Tags: build tfs2015
By : McMlok
Source: Stackoverflow.com
Question!

We delay sign assembly in DEV and when we build release I want to sign assembly. Key is in computer where is agent and access to private key is limited to some users, agent user included. I can add MSBuild parameters but I don't want to have hardcoded path to private key in every build definition. I think that I add User Capability to agent and than in task I use this capability value. But I don't know how to access value.

Is there way to get value from User Capabilities in task?

By : McMlok


Answers
I don't think this is possible. The capabilities are designed to map with the demands defined in build definitions and thus define the pool of agents capable to run the build.

In order not to hardcode this in every build definition, you can define a variable with this value and then generate a template from your this definition. Next time you create the build definition from that template, the variable will be preset with the correct path.



This video can help you solving your question :)
By: admin