How do I ensure that the latest version of user check in policies is installed on TFS clients?

We implemented our own validation policy and selected it for one of our TFS projects. If the TFS client does not have an installed policy, TFS will display an error message with installation instructions. This is all good. However, we have a problem when there is a new version of the check in politics.
It seems that TFS only enters the name of the policy, not its version.
Therefore, even if I delete the old policy link and add a new one, all clients that already have the old version installed can still use it. I would expect TFS to not allow the old version of validation to be used in politics.

How can we provide this?
One possible solution would be to check the latest version number in the form of a file for a project that anyone can access. The check itself in the policy will read this file, compare the version with its own version and generate a PolicyFailure if the version does not match.

Maybe there is an easier / better way?

+4
source share
2 answers

Finally, I decided to use a workaround initially:

"A possible workaround could be to check the latest version number as a file for the project, access to which can be any. The policy check itself will read this file, compare the version with its own version and generate a PolicyFailure if the version does not match."

It works well.

+2
source

You can add the policy version number at the end of the policy name and enter the updated version as a new policy.
This solution has a small management overhead, but ensures that you get an error with each new version of the policy.

+1
source

All Articles