{"id":72447,"date":"2026-02-18T08:35:23","date_gmt":"2026-02-18T16:35:23","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/devops\/?p=72447"},"modified":"2026-02-18T08:35:23","modified_gmt":"2026-02-18T16:35:23","slug":"tfvc-remove-existing-obsolete-policies-asap","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/tfvc-remove-existing-obsolete-policies-asap\/","title":{"rendered":"TFVC Remove Existing Obsolete Policies ASAP"},"content":{"rendered":"<p>In April 2025, we <a href=\"https:\/\/devblogs.microsoft.com\/devops\/tfvc-policies-storage-updates\/\">announced the deprecation schedule<\/a> for legacy TFVC check-in policies. This change was required due to limitations in how those policies were previously implemented and stored. The old policies have been marked as obsolete, and you can replace them by selecting the equivalent updated policy.<\/p>\n<p>We are currently in Phase II of this transition. During this phase, you can still replace obsolete policies through Team Explorer. When attempting to check in, you\u2019ll also see a notification indicating that your configuration is out of compliance and still using obsolete policies.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-policy.webp\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-policy.webp\" alt=\"tfvc policy image\" width=\"1260\" height=\"726\" class=\"aligncenter size-full wp-image-72450\" srcset=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-policy.webp 1260w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-policy-300x173.webp 300w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-policy-1024x590.webp 1024w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-policy-768x443.webp 768w\" sizes=\"(max-width: 1260px) 100vw, 1260px\" \/><\/a><\/p>\n<p>The final phase of this transition is about to be completed. Once it takes effect, any remaining obsolete policies will block all users of the repository from checking in changes. These policies will also no longer be visible or manageable through Visual Studio Team Explorer.<\/p>\n<p>If you are still using obsolete policies at that point, you will need to run a C# code snippet to remove them and restore compliance.<\/p>\n<h2>\ud83d\udccc Update Policies with Visual Studio<\/h2>\n<p>If you are able to do so, removing the obsolete policies through Team Explorer takes just a few minutes.<\/p>\n<ol>\n<li>Open Visual Studio<\/li>\n<li>Connect to the project<\/li>\n<li>Go to Team Explorer > Settings > Source Control<\/li>\n<li>Click on the <strong>Check-in Policy<\/strong> tab<\/li>\n<li>\n<p>Add new policies and remove obsolete policies<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-policy-2.webp\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-policy-2.webp\" alt=\"tfvc policy 2 image\" width=\"1340\" height=\"1044\" class=\"aligncenter size-full wp-image-72452\" srcset=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-policy-2.webp 1340w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-policy-2-300x234.webp 300w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-policy-2-1024x798.webp 1024w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-policy-2-768x598.webp 768w\" sizes=\"(max-width: 1340px) 100vw, 1340px\" \/><\/a><\/p>\n<\/li>\n<\/ol>\n<h2>\ud83d\udc68\u200d\ud83d\udcbb Update policies through C# app<\/h2>\n<p>One of the challenges in updating how we store policies is that TFVC is a legacy system. This makes it difficult to deprecate policies without disrupting customers or introducing higher-risk changes to older code paths. This situation highlights the complexities that can arise when updating legacy components. When these policies are deprecated, they are removed from the Team Explorer experience but remain in storage and must still be manually removed.<\/p>\n<p>We strongly recommend replacing any obsolete policies now to avoid disruption. If it is too late and you are blocked, you can create a small C# application and run the provided code to remove the policies and unblock yourself.<\/p>\n<p>Please note that you must be a Project Administrator in order to run the command and remove the obsolete policies.<\/p>\n<ol>\n<li>Open Visual Studio<\/li>\n<li>\n<p>Create a new C# Console App using .Net Framework<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-create-proj.webp\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-create-proj.webp\" alt=\"tfvc create proj image\" width=\"1536\" height=\"843\" class=\"aligncenter size-full wp-image-72454\" srcset=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-create-proj.webp 1536w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-create-proj-300x165.webp 300w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-create-proj-1024x562.webp 1024w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-create-proj-768x422.webp 768w\" sizes=\"(max-width: 1536px) 100vw, 1536px\" \/><\/a><\/p>\n<\/li>\n<li>\n<p>Open Solution Explorer. Right click on the project and add select <strong>Manage NuGet packages<\/strong>.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-nuget.webp\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-nuget.webp\" alt=\"tfvc nuget image\" width=\"1284\" height=\"1002\" class=\"aligncenter size-full wp-image-72455\" srcset=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-nuget.webp 1284w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-nuget-300x234.webp 300w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-nuget-1024x799.webp 1024w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-nuget-768x599.webp 768w\" sizes=\"(max-width: 1284px) 100vw, 1284px\" \/><\/a><\/p>\n<\/li>\n<li>\n<p>Search for <code>Microsoft.TeamFoundationServer.ExtendedClient<\/code> and install.<\/p>\n<\/li>\n<li>\n<p>Open the <code>Program.cs<\/code> file and add the following code into the Main method.<\/p>\n<pre><code>var collectionUri = \"https:\/\/contoso.visualstudio.com\/\";\nvar currentProjectName = \"fabrikam\";\n\nusing (TfsTeamProjectCollection tpc = new TfsTeamProjectCollection(new Uri(collectionUri)))\n{\n    var versionControlServer = tpc.GetService&lt;VersionControlServer&gt;();\n    TeamProject teamProject = versionControlServer.GetTeamProject(currentProjectName);\n    teamProject.SetCheckinPolicies(null);\n} \n<\/code><\/pre>\n<\/li>\n<li>\n<p>Update the <code>collectionUri<\/code> and <code>currentProjectName<\/code> variables to match your environment.<\/p>\n<\/li>\n<li>\n<p>Run the project.<\/p>\n<\/li>\n<\/ol>\n<p>When the code begins to run, you may be prompted to sign in using the same identity you use for Azure DevOps. After signing in, the script will execute and remove the obsolete policies.<\/p>\n<p>Once the process is complete, you can reopen Visual Studio to add policies for your project.<\/p>\n<h2>\ud83d\udc5f Walk me through it<\/h2>\n<p>To learn more about migration and dealing with custom policies, be sure to read our <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/devops\/repos\/tfvc\/tfvc-check-in-policy-migrate-guide\">migration guide<\/a>.<\/p>\n<p>We\u2019ve also put together a short video to guide you through both options for removing obsolete policies.<\/p>\n<p><div style=\"width: 3840px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-72447-1\" width=\"3840\" height=\"1644\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-steps-to-remove-obsolete-checkin-policies.mp4?_=1\" \/><a href=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-steps-to-remove-obsolete-checkin-policies.mp4\">https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-steps-to-remove-obsolete-checkin-policies.mp4<\/a><\/video><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In April 2025, we announced the deprecation schedule for legacy TFVC check-in policies. This change was required due to limitations in how those policies were previously implemented and stored. The old policies have been marked as obsolete, and you can replace them by selecting the equivalent updated policy. We are currently in Phase II of [&hellip;]<\/p>\n","protected":false},"author":921,"featured_media":72466,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[224],"tags":[7263,7262,7318,7316,7317],"class_list":["post-72447","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure","tag-devops","tag-azure-devops","tag-azure-repos","tag-community","tag-tfvc"],"acf":[],"blog_post_summary":"<p>In April 2025, we announced the deprecation schedule for legacy TFVC check-in policies. This change was required due to limitations in how those policies were previously implemented and stored. The old policies have been marked as obsolete, and you can replace them by selecting the equivalent updated policy. We are currently in Phase II of [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/72447","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/921"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=72447"}],"version-history":[{"count":1,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/72447\/revisions"}],"predecessor-version":[{"id":72473,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/72447\/revisions\/72473"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/72466"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=72447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=72447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=72447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}