This commit doesn't meet the server's policy requirements, or the policy isn't configured on your machine
Published 16 July 2015
When committing a change to TFS, the commit fails with the message: "This commit doesn't meet the server's policy requirements, or the policy isn't configured on your machine."
About TFS policies
Policies are set by your team's server administrator to make sure commits meet requirements they specify. Commits that don't meet the policy requirements are rejected by the server.
Examples of typical policies
- Commits must have comments.
- Files must have comments.
- Commits must be associated with a TFS work item.
Possible causes and fixes
Your commit doesn't meet the server's policy requirements
Depending on the policy, the server might provide a message describing the requirements you haven't met. Make sure your commit meets the policy requirements.
Associating commits with work items
If the policy needs you to associate your commit with a TFS work item, you can do this by including #A[Work Item number] at the start of the comment. For example: #A106 adding tables
For more information, see Integrating with bug tracking systems.
- To ignore policy requirements for a commit, include #ignorepolicies in the commit comment. If you want to ignore policy requirements for all future commits, you can turn off TFS policy checking.
You're using an old version of SQL Source Control
Some erroneous causes of this problem are fixed in the current version of SQL Source Control. Update to the most recent version.
The policy isn't installed on your machine
Policies must be installed on the server and each machine making commits to the server.
Make sure every policy is installed on your machine. For example, you may be missing a custom policy created by your team, or a policy installed with TFS Power Tools.
Missing .dll file
You might be missing a required .dll file.
- If the policy was set up with Visual Studio 2012, you need Microsoft.TeamFoundation.VersionControl.Controls.dll. This is installed with the default Visual Studio 2012 installation. You also need to edit the registry (see Your registry isn't configured below).
- If the policy was set up with an older version of Visual Studio, make sure TFS Power Tools is installed.
SQL Source Control is using the wrong version of Team Explorer
You might have set up your policy for a version of Team Explorer that SQL Source Control isn't using.
To fix this, follow the instructions under Fix on this troubleshooting page.
Your registry isn't configured
If the policy was set up with Visual Studio 2012, you need to edit a registry key so your TFS client can locate Microsoft.TeamFoundation.VersionControl.Controls.dll.
To do this:
- In the Windows Registry Editor, go to: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\TeamFoundation\SourceControl\Checkin Policies
Open Microsoft.TeamFoundation.VersionControl.Controls and set the value to: <your Visual Studio installation path>\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.VersionControl.Controls.dll
The default Visual Studio installation path is: C:\Program Files (x86)\Microsoft Visual Studio 11.0
Didn't find what you were looking for?
- Visit the Redgate forum
- Contact Support