{"id":3457,"date":"2026-02-18T16:35:23","date_gmt":"2026-02-18T16:35:23","guid":{"rendered":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/2026\/02\/18\/tfvc-remove-existing-obsolete-policies-asap\/"},"modified":"2026-02-18T16:35:23","modified_gmt":"2026-02-18T16:35:23","slug":"tfvc-remove-existing-obsolete-policies-asap","status":"publish","type":"post","link":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/2026\/02\/18\/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 data-opt-id=1148142034  fetchpriority=\"high\" 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\" \/><\/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><img data-opt-id=1744027497  fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/17.0.2\/72x72\/1f4cc.png\" alt=\"\ud83d\udccc\" class=\"wp-smiley\" \/> 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 &gt; Settings &gt; 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 data-opt-id=988110668  data-opt-src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-policy-2.webp\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"tfvc policy 2 image\" width=\"1340\" height=\"1044\" class=\"aligncenter size-full wp-image-72452\" \/><\/a><\/p>\n<\/li>\n<\/ol>\n<h2><img data-opt-id=103987172  data-opt-src=\"https:\/\/s.w.org\/images\/core\/emoji\/17.0.2\/72x72\/1f468-200d-1f4bb.png\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"\ud83d\udc68\u200d\ud83d\udcbb\" class=\"wp-smiley\" \/> 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 data-opt-id=12090999  data-opt-src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-create-proj.webp\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"tfvc create proj image\" width=\"1536\" height=\"843\" class=\"aligncenter size-full wp-image-72454\" \/><\/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 data-opt-id=468830476  data-opt-src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2026\/02\/tfvc-nuget.webp\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"tfvc nuget image\" width=\"1284\" height=\"1002\" class=\"aligncenter size-full wp-image-72455\" \/><\/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><img data-opt-id=1910658397  data-opt-src=\"https:\/\/s.w.org\/images\/core\/emoji\/17.0.2\/72x72\/1f45f.png\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"\ud83d\udc5f\" class=\"wp-smiley\" \/> 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\n<div class=\"wp-video\"><video class=\"wp-video-shortcode\" width=\"3840\" height=\"1644\" preload=\"none\" controls=\"controls\"><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>\n<p>The post <a href=\"https:\/\/devblogs.microsoft.com\/devops\/tfvc-remove-existing-obsolete-policies-asap\/\">TFVC Remove Existing Obsolete Policies ASAP<\/a> appeared first on <a href=\"https:\/\/devblogs.microsoft.com\/devops\">Azure DevOps Blog<\/a>.<\/p>","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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3458,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[3],"tags":[],"class_list":["post-3457","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure"],"_links":{"self":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts\/3457","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/comments?post=3457"}],"version-history":[{"count":0,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts\/3457\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/media\/3458"}],"wp:attachment":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/media?parent=3457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/categories?post=3457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/tags?post=3457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}