﻿<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="www.w3.org/2005/Atom" xmlns:sy="purl.org/rss/1.0/modules/syndication/" xmlns:dc="purl.org/dc/elements/1.1/" xmlns:content="purl.org/rss/1.0/modules/content/" xmlns:wfw="wellformedweb.org/CommentAPI/" xmlns:slash="purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Developer Support Team Foundation Server</title>
    <atom:link
      href="https://review.docs.microsoft.com/archive/blogs/dstfs/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://review.docs.microsoft.com/archive/blogs/dstfs/feed.xml</link>
    <description>Tips, tricks, thoughts and experiences from the Microsoft Team Foundation Server global support team.</description>
    <lastBuildDate>Thu, 28 Feb 2019 18:37:26 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Message in Test section of VSTS Team Project: "You can’t create test cases without a test plan. Click here to create a test plan."</title>
      <link>https://review.docs.microsoft.com/archive/blogs/dstfs/message-in-test-section-of-vsts-team-project-you-cant-create-test-cases-without-a-test-plan-click-here-to-create-a-test-plan</link>
      <pubDate>Fri, 11 Aug 2017 22:33:26 GMT</pubDate>
      <dc:creator><![CDATA[Trevor Hancock]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dstfs/?p=2495</guid>
      <description><![CDATA[Had an interesting case this week where a customer was seeing this window below inside Visual Studio...]]></description>
      <content:encoded><![CDATA[Had an interesting case this week where a customer was seeing this window below inside Visual Studio Team Services (VSTS). She was a Project Collection Admin, a Team Project Admin, had a Visual Studio Enterprise subscription active inside VSTS (so she should have had both read and write access inside Test) and the other members of her team saw a list of test plans and cases. It was just her that was seeing this and given all these factors, she should have had the same view as her colleagues.

We verified all the basics - no filters that could be causing the issue and her team had the proper Area Path and Iteration set - but still she only saw this screen below which suggested the team\team project had no tests. We verified as well that she could query for and get a list off all the same test plans and cases her colleagues were seeing in the Test section, but still <em><strong>she</strong></em> was not seeing any there.

Resolution: We had her go directly to a test plan\case URL that we knew was valid (obtained from one of her co-workers), like this: https://&lt;Account&gt;.visualstudio.com/&lt;Team Project&gt;/_testManagement?planId=193&amp;suiteId=194&amp;_a=tests. After she did that her Test section refreshed and her view matched that of her teammates.

We speculate that the issue was created by invalid registry entries for the last selected test plan and plan filter query.  In this case going to a valid test plan URL refreshed the registry with the correct setting and showed the filter applied to the test plans. She was able to access the test hub home page afterward.

HTH
Trev

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/You-cant-create-test-cases-without-a-test-plan.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2017/08/You-cant-create-test-cases-without-a-test-plan-1024x365.jpg" alt="" width="1024" height="365" class="alignleft size-large wp-image-2505" /></a>

&nbsp;

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Troubleshooting connections from Eclipse + Team Explorer Everywhere to Visual Studio Team Services</title>
      <link>https://review.docs.microsoft.com/archive/blogs/dstfs/troubleshooting-connections-from-eclipse-team-explorer-everywhere-to-visual-studio-team-services</link>
      <pubDate>Thu, 03 Aug 2017 21:29:23 GMT</pubDate>
      <dc:creator><![CDATA[Trevor Hancock]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dstfs/?p=2425</guid>
      <description><![CDATA[Today's post (his first!) comes from my Customer Service &amp; Support colleague Manuel...]]></description>
      <content:encoded><![CDATA[<blockquote>Today's post (his first!) comes from my Customer Service &amp; Support colleague Manuel Galindo.</blockquote>
Using Eclipse and Team Explorer Everywhere (TEE) to connect to Visual Studio Team Services (VSTS) from Windows is a common scenario but sometimes the normal installation does not work as expected. Sometimes the authentication is made in different ways - ADFS, Certificate SSO, Physical Credentials + PIN, etc. -  and the login is not successful. Here are the 2 potential workarounds for this issue:
<ul>
 	<li>Use OAuth Device Flow authentication</li>
 	<li>Manually obtain a VSTS Personal Access Token (PAT) for the VSTS account and store it in Windows Credential Manager as the account’s credential</li>
</ul>
&nbsp;
<h4><span style="text-decoration: underline">Enable OAuth Device Flow authentication</span></h4>
To use OAuth Device Flow, you should enable it in the JVM that runs Eclipse IDE.

1. Add the following line to the bottom of the eclipse.ini file, which is located under the user profile folder in Windows (for example: C:\Users\USERNAME\eclipse\java-neon\eclipse):
<pre style="padding-left: 30px">-DuserAgentProvider=none</pre>
2. Restart Eclipse and then try to connect to VSTS again. When you try to login, you will see a dialog window like this:

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/akamsdevicesignin.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/08/akamsdevicesignin.png" alt="" width="477" height="275" class="alignleft size-full wp-image-2426" /></a>

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

3. Click the URL (https://aka.ms/devicelogin) and you will see a screen like the one below. Copy the code from Eclipse and and paste it into this dialog. Confirm the app, which should be Visual Studio Team Services, and then complete the login from the browser.  After you do, back in Eclipse you should click OK on the code dialog and then you will be logged in to \ connected to VSTS!

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/CodeLogin.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/08/CodeLogin-1024x666.png" alt="" width="1024" height="666" class="alignleft size-large wp-image-2455" /></a>

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;
<h4><span style="text-decoration: underline"><strong>Personal Access Token (PAT) in Windows Credential Manager</strong></span></h4>
If you don't have PAT for your VSTS User ID yet, use a browser to connect to your VSTS account and create a PAT (see <a href="https://www.visualstudio.com/en-us/docs/setup-admin/team-services/use-personal-access-tokens-to-authenticate">https://www.visualstudio.com/en-us/docs/setup-admin/team-services/use-personal-access-tokens-to-authenticate</a> for details). If you're going to use the token with TEE, make sure you've created an <strong>All Scopes</strong> token. Copy the token into a text file, a OneNote, etc. so you can access it later (you won't be able to ever see it again inside VSTS).

1. Open Windows Control Panel and then open the Windows Credentials part of Credentials Manager:<a href="https://msdnshared.blob.core.windows.net/media/2017/08/Control-Panel.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2017/08/Control-Panel.jpg" alt="" width="420" height="167" class="alignleft size-full wp-image-2465" /></a>

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

2. Click "Add a generic credential":

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/GenCred.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2017/08/GenCred.jpg" alt="" width="844" height="663" class="alignleft size-full wp-image-2466" /></a>

&nbsp;

&nbsp;

3. Fill in the new Generic Credential as below with the following and then click OK to save it:
<ul>
 	<li>VSTS account domain</li>
 	<li>A user name. This can be anything really since we're using a PAT we don't need a specific name here</li>
 	<li>Your password, which is the PAT you generated earlier (and saved to OneNote, <em>right</em>? &lt;g&gt;)</li>
</ul>
Restart Eclipse, which should automatically use the above configured PAT for authentication and connect you right up to VSTS.

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/cred.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2017/08/cred.jpg" alt="" width="602" height="241" class="alignleft size-full wp-image-2475" /></a>

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Limit access to just Visual Studio Team Services using Azure Active Directory Premium</title>
      <link>https://review.docs.microsoft.com/archive/blogs/dstfs/limit-access-to-just-visual-studio-team-services-using-azure-active-directory-premium</link>
      <pubDate>Thu, 27 Jul 2017 14:58:30 GMT</pubDate>
      <dc:creator><![CDATA[Trevor Hancock]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dstfs/?p=2375</guid>
      <description><![CDATA[By leveraging Conditional Access Policies of Azure Active Directory (AAD) Premium it's possible to...]]></description>
      <content:encoded><![CDATA[By leveraging Conditional Access Policies of Azure Active Directory (AAD) Premium it's possible to add external users to your AAD and limit them to just Visual Studio Team Services (VSTS).
<blockquote></blockquote>
You'll need:
<ul>
 	<li>An Azure subscription</li>
 	<li>AAD Premium (you can get a trial if you just want to try this out)</li>
 	<li>A VSTS account backed by the Premium AAD</li>
 	<li>An external user you can invite to your AAD \ VSTS (someone not native to the AAD)</li>
</ul>
&nbsp;

Here's how I set up a demo (pictures below, too):
<ol>
 	<li>In Portal.Azure.com, enabled AAD Premium on <span>Conditional</span>VSTS.onmicrosoft.com</li>
 	<li>Created a native AAD user - ROOT@<span>Conditional</span><span>VSTS</span><span>.onmicrosoft.com - </span>who was a global admin</li>
 	<li>Invited SomeExternalDude@Outlook.com to the AAD and accepted that invite via mail at Outlook.com</li>
 	<li>Back in <span>Portal.Azure.com, </span>created an AAD group named "B2B Users" and added <span>SomeExternalDude@Outlook.com</span> to it</li>
 	<li>Logged into aka.ms/getvsts as <span>ROOT@</span><span>Conditional</span><span>VSTS</span><span>.onmicrosoft.com</span> and created a new VSTS account. Because I logged in there as a member <span>Conditional</span><span>VSTS.onmicrosoft.com, my new VSTS was backed by that AAD when it was created.</span></li>
 	<li>Logged into my VSTS as <span>ROOT@</span><span>Conditional</span><span>VSTS</span><span>.onmicrosoft.com (the owner) and a</span>dded <span>SomeExternalDude@Outlook.com to it, on the Users Hub</span></li>
 	<li>In a different browser (not another instance, but another software browser) I logged into VSTS as <span>SomeExternalDude@Outlook.com </span>successfully. This was just to confirm all was working up to this point.</li>
 	<li>Back in AAD on <span>Portal.Azure.com I </span>set up a new Conditional Access Policy designed to permit <span>SomeExternalDude@Outlook.com to </span>*only* access VSTS. Screen shots below.</li>
 	<li>With the <span>Conditional Access Policy enabled, back in my VSTS browser instance as SomeExternalDude@Outlook.com I signed out </span>and then tried to sign back in. Still worked.</li>
</ol>
At this point you might be wondering <em>what's the point</em>? Well, to see what happens when VSTS &amp; Microsoft Azure Management are *not* included in the exceptions list for that Conditional Access Policy, edit it and remove them. The next time any member of the "B2B Users" group tries to log into a VSTS account backed by that AAD they'll see something like the message pictured below <em>("You don't have access to this")</em>.

You can use a variation on this process to let AAD groups into only VSTS, or let them into everything <em>but</em> VSTS.

I hope you find this helpful.
--TrevorH

&nbsp;

References:
<ul>
 	<li><a href="https://azure.microsoft.com/en-us/resources/videos/intro-to-microsoft-azure-ad-premium/">Intro to Microsoft Azure AD Premium</a></li>
 	<li><a href="https://docs.microsoft.com/en-us/azure/active-directory/active-directory-conditional-access-azure-portal-get-started">Get started with conditional access in Azure Active Directory</a></li>
 	<li><a href="https://www.visualstudio.com/en-us/docs/setup-admin/team-services/manage-organization-access-for-your-account-vs">Team Services: Access with Azure Active Directory (Azure AD)</a></li>
 	<li><a href="https://www.visualstudio.com/en-us/docs/setup-admin/team-services/manage-conditional-access">Manage conditional access to Team Services</a></li>
</ul>
&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2017/07/AAD-CAP-VSTS-BLOCKED.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/07/AAD-CAP-VSTS-BLOCKED.png" alt="" width="419" height="422" class="alignleft size-full wp-image-2385" /></a>

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

<hr />

&nbsp;
<h4>Azure AD Conditional Access Policy to let members of AAD group "B2B Users" access *only* VSTS</h4>
&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2017/07/AAD.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/07/AAD-1024x567.png" alt="" width="1024" height="567" class="alignleft size-large wp-image-2407" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/2017/07/AADVSTSCAP1.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/07/AADVSTSCAP1.png" alt="" width="852" height="690" class="alignleft size-full wp-image-2386" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/2017/07/AADVSTSCAP2.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/07/AADVSTSCAP2.png" alt="" width="945" height="880" class="alignleft size-full wp-image-2396" /></a>

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2017/07/AADVSTSCAP3.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/07/AADVSTSCAP3.png" alt="" width="841" height="909" class="alignleft size-full wp-image-2405" /></a>]]></content:encoded>
    </item>
    <item>
      <title>How To Checkin Files To 2 TFVC Projects At The Same Time</title>
      <link>https://review.docs.microsoft.com/archive/blogs/dstfs/how-to-checkin-files-to-2-tfvc-projects-at-the-same-time</link>
      <pubDate>Tue, 21 Mar 2017 19:29:44 GMT</pubDate>
      <dc:creator><![CDATA[Jeff Lambert]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dstfs/?p=2165</guid>
      <description><![CDATA[3/21/2017
Jeff here from the VSTS support team.

Someone asked how to map 2 VSTS TFVC Projects so...]]></description>
      <content:encoded><![CDATA[<p style="text-align: right">3/21/2017</p>
Jeff here from the VSTS support team.

Someone asked how to map 2 VSTS TFVC Projects so we can checkin files to both projects at the same time. They wanted to see how TFVC/VSTS shows 2 projects for the same <a href="https://www.visualstudio.com/fr-fr/docs/integrate/get-started/service-hooks/events#tfvc.checkin">checkin</a> notification(in particular, the teamProjectIds field). We can easily see that with a Web Hook Service Hook when we link our VSTS account to RequestBin for checkin notifications.

<a href="https://msdnshared.blob.core.windows.net/media/2017/03/snap002056.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/snap002056.png" alt="snap002056" width="492" height="259" class="alignnone  wp-image-2265" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/2017/03/snap002057.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/snap002057.png" alt="snap002057" width="338" height="310" class="alignnone  wp-image-2275" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/2017/03/snap002058.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/snap002058.png" alt="snap002058" width="954" height="210" class="alignnone  wp-image-2276" /></a>

Let’s connect to the first VSTS TFVC Project in Visual Studio:

<a href="https://msdnshared.blob.core.windows.net/media/2017/03/snap002059.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/snap002059.png" alt="snap002059" width="360" height="520" class="alignnone  wp-image-2277" /></a>

And map it to a folder underneath a folder that will be the root for both the TFVC projects we are going to checkin changes together for. I added TFVC to the default path, so I know these TFVC projects are together.

<a href="https://msdnshared.blob.core.windows.net/media/2017/03/snap0020601.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/snap0020601.png" alt="snap002060" width="339" height="494" class="alignnone size-full wp-image-2285" /></a>

Now let’s go to Source Control Explorer to map the second TFVC project:

<a href="https://msdnshared.blob.core.windows.net/media/2017/03/snap0020611.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/snap0020611.png" alt="snap002061" width="298" height="345" class="alignnone  wp-image-2295" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/2017/03/snap002062.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/snap002062.png" alt="snap002062" width="657" height="514" class="alignnone  wp-image-2195" /></a>

After we map it, we can create some files to get checked in.

<a href="https://msdnshared.blob.core.windows.net/media/2017/03/snap002063.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/snap002063.png" alt="snap002063" width="604" height="162" class="alignnone  wp-image-2196" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/2017/03/snap002065.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/snap002065.png" alt="snap002065" width="592" height="154" class="alignnone  wp-image-2216" /></a>

And then add them to Source Control:

<a href="https://msdnshared.blob.core.windows.net/media/2017/03/snap002064.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/snap002064.png" alt="snap002064" width="492" height="381" class="alignnone  wp-image-2206" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/2017/03/snap002066.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/snap002066.png" alt="snap002066" width="497" height="388" class="alignnone  wp-image-2226" /></a>

Here are the files waiting to be checked in:

<a href="https://msdnshared.blob.core.windows.net/media/2017/03/snap002067.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/snap002067.png" alt="snap002067" width="728" height="163" class="alignnone  wp-image-2235" /></a> <a href="https://msdnshared.blob.core.windows.net/media/2017/03/snap002068.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/snap002068.png" alt="snap002068" width="738" height="158" class="alignnone  wp-image-2236" /></a>

Here are the pending changes waiting to be checked in:

<a href="https://msdnshared.blob.core.windows.net/media/2017/03/snap0020691.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/snap0020691.png" alt="snap002069" width="269" height="370" class="alignnone  wp-image-2305" /></a>

Here is the resulting checkin for those 2 files in 2 projects:

<a href="https://msdnshared.blob.core.windows.net/media/2017/03/snap0020701.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/snap0020701.png" alt="snap002070" width="770" height="322" class="alignnone  wp-image-2315" /></a>

Here is the full XML for the checkin:

"subscriptionId":"61a792ce-9ddc-40a5-811e-0640ab08800f","notificationId":1,"id":"6eb85409-f7b7-4fc0-bc4d-aac5bca1fb05","eventType":"tfvc.checkin","publisherId":"tfs","scope":"all","message":{"text":"VSTS Blog checked in changeset 8: VSTS-Blog - Double Checkin","html":"VSTS Blog checked in changeset &lt;a href=\"https://vsts-blog.visualstudio.com/web/cs.aspx?pcguid=9a0adf58-227a-4bce-adc9-f5450850aad6&amp;amp;cs=8\"&gt;8&lt;/a&gt;: VSTS-Blog - Double Checkin","markdown":"VSTS Blog checked in changeset [8](https://vsts-blog.visualstudio.com/web/cs.aspx?pcguid=9a0adf58-227a-4bce-adc9-f5450850aad6&amp;cs=8): VSTS-Blog - Double Checkin"},"detailedMessage":{"text":"VSTS Blog checked in changeset 8: VSTS-Blog - Double Checkin","html":"VSTS Blog checked in changeset &lt;a href=\"https://vsts-blog.visualstudio.com/web/cs.aspx?pcguid=9a0adf58-227a-4bce-adc9-f5450850aad6&amp;amp;cs=8\"&gt;8&lt;/a&gt;: VSTS-Blog - Double Checkin","markdown":"VSTS Blog checked in changeset [8](https://vsts-blog.visualstudio.com/web/cs.aspx?pcguid=9a0adf58-227a-4bce-adc9-f5450850aad6&amp;cs=8): VSTS-Blog - Double Checkin"},"resource":{"hasMoreChanges":true,<strong>"teamProjectIds":["0695931c-21c0-47e6-904c-add0c2d1527f","83416a37-d523-417c-93a2-b8bf6dee7e4b"]</strong>,"changesetId":8,"url":"https://vsts-blog.visualstudio.com/_apis/tfvc/changesets/8","author":{"id":"d24ac5a3-ae7e-6858-8bff-2ae8420c64be","displayName":"VSTS Blog","uniqueName":"VSTS-Blog@outlook.com","url":"https://app.vssps.visualstudio.com/A958272a6-6094-4330-aaa1-23c3b9b80363/_apis/Identities/d24ac5a3-ae7e-6858-8bff-2ae8420c64be","imageUrl":"https://vsts-blog.visualstudio.com/_api/_common/identityImage?id=d24ac5a3-ae7e-6858-8bff-2ae8420c64be"},"checkedInBy":{"id":"d24ac5a3-ae7e-6858-8bff-2ae8420c64be","displayName":"VSTS Blog","uniqueName":"VSTS-Blog@outlook.com","url":"https://app.vssps.visualstudio.com/A958272a6-6094-4330-aaa1-23c3b9b80363/_apis/Identities/d24ac5a3-ae7e-6858-8bff-2ae8420c64be","imageUrl":"https://vsts-blog.visualstudio.com/_api/_common/identityImage?id=d24ac5a3-ae7e-6858-8bff-2ae8420c64be"},"createdDate":"2017-03-21T17:30:25Z","comment":"VSTS-Blog - Double Checkin"},"resourceVersion":"1.0","resourceContainers":{"collection":{"id":"9a0adf58-227a-4bce-adc9-f5450850aad6","baseUrl":"https://vsts-blog.visualstudio.com/"},"account":{"id":"958272a6-6094-4330-aaa1-23c3b9b80363","baseUrl":"https://vsts-blog.visualstudio.com/"}},"createdDate":"2017-03-21T17:30:29.0671123Z"}

/Jeff

Happy Developing!]]></content:encoded>
    </item>
    <item>
      <title>Set Service Hooks permissions on existing projects” is failing with “ExtensionNotFound”</title>
      <link>https://review.docs.microsoft.com/archive/blogs/dstfs/set-service-hooks-permissions-on-existing-projects-is-failing-with-extensionnotfound</link>
      <pubDate>Thu, 26 Jan 2017 01:42:46 GMT</pubDate>
      <dc:creator><![CDATA[Nitish Nagpal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dstfs/?p=2135</guid>
      <description><![CDATA[I worked with a customer who complained that after an upgrade from TFS 2013 update 2 to TFS 2017 he...]]></description>
      <content:encoded><![CDATA[I worked with a customer who complained that after an upgrade from TFS 2013 update 2 to TFS 2017 he sees the following errors in the job history:

“Set Service Hooks permissions on existing projects” is failing with “ExtensionNotFound”.

I came to know that the job was from the period where long running servicing was performed in a job, and the job disables itself after running successfully.  The function of the job is now performed by a servicing step in TFS 2017 U1.  The loss of functionality provided by this job was discovered during a post-2017RTM upgrade and added back to TFS 2017 U1 as a servicing step.

TFS 2013 -&gt; TFS 2017 U1 (job will never be created.  Functionality previously performed by the job is now provided via a servicing step).

TFS 2013 -&gt; TFS 2017.   (has the problem reported here.  Job continually fails ☹)

TFS 2013 -&gt; TFS 2015.   (job runs and is disabled after running once.  Perhaps the job definition is removed by a cleanup job – I’m not sure about that)

TFS 2015 -&gt; TFS 2017.   (job already ran with TFS 2015 and was disabled with 2015, no need to run again).

Solution:

For now if any customer complains about this issue ask them either just to ignore this failure or disable this job by executing

UPDATE  tbl_JobDefinition

SET     EnabledState = 2

WHERE   JobId = '6653A70B-1A47-4FB6-83F1-3C9781F0DCA9'

AND PartitionId = 1

in all collection databases.

Written by: Nitish Nagpal, Support Escalation Engineer]]></content:encoded>
    </item>
    <item>
      <title>GIT clone SSH CI build issue in TFS 2015.3</title>
      <link>https://review.docs.microsoft.com/archive/blogs/dstfs/git-clone-ssh-ci-build-issue-in-tfs-2015-3</link>
      <pubDate>Fri, 06 Jan 2017 11:23:03 GMT</pubDate>
      <dc:creator><![CDATA[Nitish Nagpal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dstfs/?p=2035</guid>
      <description><![CDATA[Issue:

In TFS 2015.3, if you have setup a CI build defection for a GIT repository and if you...]]></description>
      <content:encoded><![CDATA[<strong><u>Issue:</u></strong>

In TFS 2015.3, if you have setup a CI build defection for a GIT repository and if you clone the repository using SSH and then do a GIT push, the builds are not getting triggered.

<strong><u>Error messages:</u></strong>

There are no error messages generated. But, there is not CI build triggered as well.

<strong><u>Diagnosis:</u></strong>

Consider the following scenario.

&nbsp;
<ul>
 	<li>You have a TFS 2015.3 server, in which you have a GIT repository.</li>
 	<li>You have created a CI build definition for this repository.</li>
 	<li>You clone the GIT repository to your local folder, using the normal http or https clone. Then, you do some change and push the changes. You will notice a CI build is triggered.</li>
 	<li>Now, you clone the same GIT repository to your local folder, using the SSH clone ( steps here à <a href="https://www.visualstudio.com/en-us/docs/git/use-ssh-keys-to-authenticate">https://www.visualstudio.com/en-us/docs/git/use-ssh-keys-to-authenticate</a>).</li>
 	<li>Now, if you do some changes and then push it, no CI build will be triggered.</li>
</ul>
&nbsp;

<strong><u>Solution:</u></strong>

This is a bug with TFS 2015.3 and it is fixed in TFS ‘15’. However, can use the below steps to resolve the issue in TFS 2015.3.

&nbsp;
<ul>
 	<li>Navigate to the path ‘C:\Program Files\Microsoft Team Foundation Server 15.0\Application Tier\Web Services\bin’ on your TFS application server.</li>
 	<li>Identify the file named ‘TeamFoundationSshService.exe.config’. Save a copy of the file in a separate location, as a backup.</li>
 	<li>Then, add the below lines in the file, within the tag &lt;assemblyBinding&gt;</li>
</ul>
&lt;dependentAssembly&gt;

&lt;assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;

&lt;bindingRedirect oldVersion="5.6.0.0-5.6.4.0" newVersion="5.6.4.0" /&gt;

&lt;/dependentAssembly&gt;

&lt;dependentAssembly&gt;

&lt;assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;

&lt;bindingRedirect oldVersion="5.6.0.0-5.6.4.0" newVersion="5.6.4.0" /&gt;

&lt;/dependentAssembly&gt;

&lt;dependentAssembly&gt;

&lt;assemblyIdentity name="System.Spatial" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;

&lt;bindingRedirect oldVersion="5.6.0.0-5.6.4.0" newVersion="5.6.4.0" /&gt;

&lt;/dependentAssembly&gt;

&nbsp;
<ul>
 	<li>Go to ‘Services’ and restart the service named ‘Team Foundation Ssh Service’</li>
 	<li>If you have multiple TFS application server, you will have to perform the steps in all of them.</li>
 	<li>Do a fresh SSH clone and then make changes and push them and check if CI build is getting triggered.</li>
</ul>
Note: This is applicable only for closing GIT repository using ‘git clone ssh’. For any other issues, or if the issue is present even after applying the above steps, please open a support case with Microsoft.

<strong>Written by: Sivarajaguru, Support Engineer, Team Foundation Server Support Team</strong>

<strong>Reviewed by: Nitish Nagpal, Support Escalation Engineer</strong>]]></content:encoded>
    </item>
    <item>
      <title>Test Management Warehouse Adapter – General issues and their resolutions</title>
      <link>https://review.docs.microsoft.com/archive/blogs/dstfs/test-management-warehouse-adapter-general-issues-and-their-resolutions</link>
      <pubDate>Wed, 28 Dec 2016 19:42:29 GMT</pubDate>
      <dc:creator><![CDATA[Nitish Nagpal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dstfs/?p=2015</guid>
      <description><![CDATA[TFS warehouse is a critical component of On-Prem TFS reporting stack as it enables reporting based...]]></description>
      <content:encoded><![CDATA[<span style="color: #000000;font-family: Calibri">TFS warehouse is a critical component of On-Prem TFS reporting stack as it enables reporting based on common dimensions across different stages in the Team Project lifecycle. Data in the TFS warehouse flows from collection databases through a set of </span><a href="https://msdn.microsoft.com/en-us/library/ms244687.aspx#Warehouse adapters"><span style="color: #0563c1;font-family: Calibri">adapters</span></a><span style="color: #000000;font-family: Calibri">. </span>

<span style="color: #000000;font-family: Calibri">In TFS 2015 Update 3, we fixed key performance issues in Test Management Warehouse Adapter to make it more reliable and fast. However, SQL performance depends a lot on the data shape and size of the store and you could still face issues when the warehouse is updated. Such issues generally surface during warehouse rebuild or if the adapter hasn’t run for a long period and a lot of data has to be processed into warehouse.</span>

<span style="color: #000000;font-family: Calibri">The focus of this blog post is on diagnosing general timeout issues with Test Management Warehouse adapter and on their resolutions. </span>

<span style="color: #000000;font-family: Calibri">Note that while the resolutions mentioned in this blog post will help fix the adapter timeout issues, it is strongly recommended to avoid the problem itself by getting rid of unwanted\old test management data with help of </span><a href="https://blogs.msdn.microsoft.com/visualstudioalm/2015/10/08/test-result-data-retention-with-team-foundation-server-2015/"><span style="color: #0563c1;font-family: Calibri">test results data retention</span></a><span style="color: #000000;font-family: Calibri"> which is available in TFS 2015 RTM and newer versions.</span>
<p style="padding-left: 30px"><em><strong><span style="color: #000000;font-family: Calibri">Note: Test Management Warehouse adapter works on </span><a href="https://msdn.microsoft.com/en-us/library/ms182776.aspx"><span style="color: #0563c1;font-family: Calibri">SQL Server Rowversion</span></a><span style="color: #000000;font-family: Calibri"> logic. Since last sync, if there is any change in a test management record in collection database, it will sync the change to warehouse. </span></strong></em><em><strong><span style="color: #000000;font-family: Calibri">In TFS 2017 RTM, the schema of multiple test management tables has been </span><a href="https://blogs.msdn.microsoft.com/visualstudioalm/2016/11/16/test-result-storage-improvements-and-impact-on-upgrading-to-team-foundation-server-2017/"><span style="color: #0563c1;font-family: Calibri">revamped to optimize</span></a><span style="color: #000000;font-family: Calibri"> on storage space and performance. During upgrade to TFS 2017 RTM, the existing test management data gets migrated to the new schema causing change in the rowversion associated with almost all the test management records in collection databases. Test management adapter sees this as a new change and tries to sync all the records again to warehouse which can be time consuming. At present no warning is shown to the user during pre-upgrade steps about this behavior. It will be fixed in newer versions of TFS. </span></strong></em><em><strong><span style="color: #000000;font-family: Calibri">To avoid this it is recommended to sync warehouse fully before starting the upgrade. This scenario has been handled and will not cause migrated rows to sync again to warehouse.</span></strong></em></p>

<h4><span style="color: #3366ff">Common timeout issues with test management adapter &amp; their resolutions</span></h4>
Test artifacts get synced to warehouse in batches. Batch size for a test artifact is configurable and can be increased (or decreased) to process more (or less) data in a single iteration. While processing more data in a single batch is desirable as it will reduce the number of iterations required to sync whole data and hence should enhance adapter’s performance, it may not turn out that way as higher batch size will increase SQL transaction size which in turn will consume more CPU and memory thus leading to thrashing and overall system performance degradation. On the other hand having a very small batch size will increase the number of iterations required to process whole data which can be very time consuming. Thus batch size should be set to an optimal value which will cause less iterations and also keep memory and CPU requirements under check.

For test management adapter, timeout generally occurs when current batch of data under processing is leading to large SQL transaction size. Workaround is to reduce appropriate batch size temporarily till adapter processes the data fully once. After that, batch size can be reset back to the default value.

Batch sizes for different test artifacts are stored as key value pairs in warehouse database. Batch size key is different for each test artifact. Appropriate batch size key needs to be tweaked depending upon the artifact being processed during timeout.

For a batch size key, selection of appropriate batch size value is an iterative process. It is recommended to reduce this value by an order of 10 at a time and retry test management adapter processing till it succeeds. E.g.: 1000, 100, 10, 1. Note that test management adapter batch size settings will not affect other adapters in any way.

Thus test management adapter timeout issues resolution is a two-step process:
<ol>
 	<li>Select appropriate batch size key to be reduced: Can be determined by looking at the stack trace. Check section ‘Test Management adapter timeout scenarios’ for details</li>
 	<li>Set batch size value: Check section ‘SQL queries to set test management adapter batch size value’ for details</li>
</ol>
Note: During adapter timeout, following error message is received:

<span style="color: #ff0000">Exception Message: TF246018: The database operation exceeded the timeout limit and has been cancelled. Verify that the parameters of the operation are correct. (type DatabaseOperationTimeoutException)</span>

Steps to obtain error message and stack trace are available in attached file:

DiagnosticInformation.zip
<h4><span style="color: #3366ff">Test Management adapter timeout scenarios</span></h4>
1. Timeout during test results processing

Typical stack trace:

<span style="color: #ff0000">at Microsoft.TeamFoundation.TestManagement.Warehouse.WarehouseResultDatabase.QueryTestResults(SqlBinary watermark, Int32 limit, ProcessRowCallback resetCallback, ProcessMappingDataCallback dataCallback, ResolveIdentities resolveIdentitiesCallBack) …Resolution: Reduce test results processing batch size (default = 2000)</span>

<span style="color: #ff0000">at Microsoft.TeamFoundation.TestManagement.Warehouse.TeamTestWarehouseAdapter.QueryForResults(WarehouseResultDatabase wrd, SqlBinary waterMark, Int32 limit)</span>

…

Batch Size Key: /Adapter/Limit/TestManagement/FactTestResult

2. Timeout during test point processing

Typical stack trace:

<span style="color: #ff0000">…</span>

<span style="color: #ff0000">at Microsoft.TeamFoundation.TestManagement.Warehouse.WarehouseResultDatabase.QueryTestPointData(SqlBinary watermark, SqlBinary endWatermark, int limit,                                     IEnumerable&lt;IdToAreaIteration&gt; areaIterationMap, ProcessRowCallback deletedCallback, ProcessMappingDataCallback addedCallback, ResolveIdentities resolveIdentitiesCallBack)</span>

<span style="color: #ff0000">at Microsoft.TeamFoundation.TestManagement.Warehouse.TeamTestWarehouseAdapter.QueryForTestPoints(WarehouseResultDatabase wrd, SqlBinary waterMark, Int32 limit)</span>

<span style="color: #ff0000">…</span>

Resolution: Reduce test point processing batch size (default = 10000)

Batch Size Key: /Adapter/Limit/TestManagement/FactTestPoint

3.  Timeout while processing deletes

<span style="color: #000000">Typical stack trace:</span>

<span style="color: #ff0000">... Microsoft.TeamFoundation.Warehouse.WarehouseDataAccessComponent.DestroyResults(String projectId String data ResultDeletionFormat format Int32 limit)   at Microsoft.TeamFoundation.TestManagement.Warehouse.TeamTestWarehouseAdapter.ProcessRunDeletes(IWarehouseDataAccessComponent dac ObjectTypes objectType)   at Microsoft.TeamFoundation.TestManagement.Warehouse.TeamTestWarehouseAdapter.DeleteTcmObject(IWarehouseDataAccessComponent dac ObjectTypes objectType Boolean deleteResults)</span>

…

Resolution: Reduce test run deletion batch size (default = 10)

Batch Size Key: Adapter/Config/TestManagement/RunDeleteBatchSize
<h4><span style="color: #3366ff">SQL queries to set test management adapter batch size value</span></h4>
Following are the set of queries to achieve this. Execute them against the <strong><u>warehouse database</u></strong>.

Note: These settings will not affect ongoing test management warehouse job processing if any. They will come into effect from next invocation of the adapter.

<span style="color: #3366ff">DECLARE</span> @PropertyScope NVARCHAR(256) = NULL

–-NULL implies that property is applicable for all collections.

--SET it to collection GUID for a particular collection.

--To obtain Collection GUID, run following query against TFS Configuration database:

--<span style="color: #3366ff">SELECT</span> HostId <span style="color: #3366ff">as</span> CollectionGuid, <span style="color: #3366ff">Name as</span> CollectionName <span style="color: #3366ff">FROM</span> tbl_ServiceHost

<span style="color: #3366ff">DECLARE <span style="color: #000000">@BatchSizeKey </span>NVARCHAR(256)</span> = <span style="color: #000000">&lt;Select appropriate batch size key. Check section Test Management adapter timeout scenarios for details&gt;</span>

<span style="color: #3366ff">DECLARE</span> @BatchSize <span style="color: #3366ff">INT</span> = 0

<span style="color: #339966">-- Dump current settings for backup (Save this for reverting back later)</span>

<span style="color: #339966">-- If query returns 0 rows, it means default value is in use. Hence at the end  </span>

<span style="color: #339966">-- this key can be deleted to restore the default setting</span>

<span style="color: #3366ff">EXEC</span> [dbo].[prc_PropertyBag_Get] @Property_Scope = NULL, @Property_Key = @BatchSizeKey, @Property_Value = @BatchSize <span style="color: #3366ff">OUTPUT</span>

<span style="color: #3366ff">SELECT</span> @BatchSize

SET @BatchSize INT = 100 --<span style="color: #339966">Set batch size to an appropriate value lower than the default.</span>

--It is recommended to reduce this by an order of 10 at a time and retry completing the

--test management adapter processing. E.g.: 1000, 100, 10, 1

--Update batch size for the job step

<span style="color: #3366ff">EXEC</span> [dbo].[prc_PropertyBag_Set] @Property_Scope = NULL, @Property_Key = @BatchSizeKey, @Property_Value = @BatchSize

<span style="color: #339966">-- DO THIS AFTER RESOLVING ISSUE:</span>

<span style="color: #339966">-- After the warehouse full processing is complete, subsequent processing is incremental   -- only. We can now revert batch size to factory settings (run this if all is well)</span>

<span style="color: #339966">-- Run this query on the warehouse to see the batch size configurations potentially set --- as workaround</span>

<span style="color: #3366ff">EXEC</span> [dbo].[prc_PropertyBag_Get] @Property_Scope = NULL, @Property_Key = @BatchSizeKey, @Property_Value = @BatchSize <span style="color: #3366ff">OUTPUT</span>

<span style="color: #3366ff">SELECT</span> @BatchSize

<span style="color: #339966">-- For the ones identified in the last query, use the query below to delete them and</span>

<span style="color: #339966">-- reset to factory settings.</span>

<span style="color: #3366ff">EXEC</span> [dbo].[prc_PropertyBag_Delete] @Property_Scope = NULL, @Property_Key = @BatchSizeKey

<em>Tip: Supported only in TFS 2015 Update 3 and newer versions</em>

<em>In case there is no requirement to report on code coverage data, then it can be turned off (default is ON) completely in the test adapter by executing following query against warehouse database:</em>

<em><span style="color: #0000ff">INSERT INTO</span> _PropertyBag</em>

<em><span style="color: #0000ff">VALUES</span>(NULL, <span style="color: #ff0000">'/Adapter/Config/TestManagement/CodeCoverageProcessingEnabled', 'false'</span>) –‘true’ to enable</em>

<em>Above query will disable code coverage processing for all the collections. To disable it for specific collections, run following query for each collection:</em>

<em><span style="color: #0000ff">INSERT INTO</span> _PropertyBag</em>

<em><span style="color: #0000ff">VALUES</span>(‘Collection Guid’, <span style="color: #ff0000">'/Adapter/Config/TestManagement/CodeCoverageProcessingEnabled'</span>, '<span style="color: #ff0000">false'</span>) --‘true’ to enable</em>

<em>Collection Guid can be obtained by running following query against TFS Configuration database:</em>

<em><span style="color: #0000ff">SELECT</span> * <span style="color: #0000ff">FROM</span> tbl_ServiceHost</em>

<em>Value of ‘HostId’ column is the collection GUID for a collection</em>

<em>Note that, running above queries will not affect code coverage data in the collection databases. It will simply stop code coverage data sync in the warehouse. It can be turned on any time by executing above queries with value: ‘true’.</em>

<em>Also note that these settings will not affect ongoing test management warehouse job processing if any. They will come into effect from next invocation of the adapter.</em>

For any other issues with test management warehouse adapter, capture diagnostic data as mentioned in attached file DiagnosticInformation.zip and contact Microsoft support team.
<h4>Important points regarding warehouse rebuild</h4>
<ol>
 	<li>In several warehouse issues reported by users, we found that during event of a warehouse job failure, they trigger warehouse rebuild hoping that it will resolve the problem. While it might work but it is not a recommended solution as it can take considerable time to sync whole data and the job can fail again with same problem. In such cases if it is a timeout issue with test management warehouse adapter then follow the resolution mentioned in this blog else reach out to Microsoft support team.</li>
 	<li>It is often a confusion on whether to rebuild warehouse during TFS upgrade - whether to an RTM version or to an update. Note that if a rebuild is required then it gets triggered  automatically during upgrade. User doesn’t need to initiate it explicitly.</li>
</ol>
<strong>Written and Reviewed by: Shyam Gupta</strong>

<a href="https://msdnshared.blob.core.windows.net/media/2016/12/DiagnosticInformation1.zip">diagnosticinformation</a>]]></content:encoded>
    </item>
    <item>
      <title>VSTS Test runs reporting inconsistent count of tests run with each build</title>
      <link>https://review.docs.microsoft.com/archive/blogs/dstfs/vsts-test-runs-reporting-inconsistent-count-of-tests-run-each-build</link>
      <pubDate>Wed, 21 Dec 2016 17:16:13 GMT</pubDate>
      <dc:creator><![CDATA[Nitish Nagpal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dstfs/?p=1997</guid>
      <description><![CDATA[Issue:

While executing unit tests as a part of CI, we see issues with the count in build results...]]></description>
      <content:encoded><![CDATA[<strong>Issue:</strong>

While executing unit tests as a part of CI, we see issues with the count in build results page. In our scenario we had C# tests as well as Gulp tests and after the build completes successfully we found that test results in build summary page do not give the exact count of the tests executed which is 184[111 C# tests and 73 gulp tests] but the values are 2 x C# tests + JS unit tests

<a href="https://msdnshared.blob.core.windows.net/media/2016/12/a.png"><img width="300" height="291" class="alignnone size-medium wp-image-2005" alt="a" src="https://msdnshared.blob.core.windows.net/media/2016/12/a-300x291.png" /></a>

<strong>Cause:</strong>

The vstest task automatically publishes the results. The additional publish task just publishes the duplicate results from the vstest task. Each task in build is independent and so ultimately the build results takes the aggregation results from each step.

<strong>Solution</strong>:

Removing the publish test results task should not cause this issue.

<strong>Written by: Deepak Kumar Mishra, Support Engineer</strong>

<strong>Reviewed by: Deepak Mittal, Escalation Engineer</strong>]]></content:encoded>
    </item>
    <item>
      <title>TFS Reporting database backup fails with TFS Backup tool</title>
      <link>https://review.docs.microsoft.com/archive/blogs/dstfs/tfs-reporting-database-backup-fails-with-tfs-backup-tool</link>
      <pubDate>Mon, 12 Dec 2016 13:46:34 GMT</pubDate>
      <dc:creator><![CDATA[Nitish Nagpal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dstfs/?p=1976</guid>
      <description><![CDATA[Issue Details: 

Reportserver and Reportservertempdb backup with TFS backup tool fails with the...]]></description>
      <content:encoded><![CDATA[<strong>Issue Details: </strong>

Reportserver and Reportservertempdb backup with TFS backup tool fails with the following errors.

TF400981: Failed to backup the Reporting Services encryption key. You can try using RSKEYMGMT command to backup the encryption key

<a href="https://msdnshared.blob.core.windows.net/media/2016/12/ikey.png"><img width="462" height="194" class="alignnone wp-image-1985" alt="ikey" src="https://msdnshared.blob.core.windows.net/media/2016/12/ikey-300x126.png" /></a>

<strong>Cause</strong>

It was due to the implementation of firewall infrastructure which did not allow WMI Queries which is being used by TFS backup tool in the background.

<strong>Troubleshooting:</strong>
<ol>
 	<li>We took backup of encryption key as mentioned in the warning message but this did not help.</li>
 	<li>So we took a debug view trace and got the following COM exception:<strong>00000799             157.66336060     [4692] [Verbose@14:25:37.059] Caught COMException attemping WMI connect(). The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)            </strong><strong>                </strong><strong>00000800             178.42982483     [4692] [Verbose@14:25:58.106] Caught COMException attemping WMI connect(). The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) </strong><strong>00000798             136.35156250     [4692] [Verbose@14:25:16.028] Caught COMException attemping WMI connect(). The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)            </strong></li>
 	<li>This helped in identifying that this issue is mainly due to blocking of the WMI requests in the background.</li>
 	<li>We checked and found that the Microsoft firewall was off but on digging deeper found that there was a third party firewall hardware available in this case which blocked all requests.</li>
</ol>
<strong>Resolution:</strong>
<ol>
 	<li>WMI uses ports 135 and also the range of ports between 49152-65535.</li>
 	<li>We opened port 135 and 49154 which was identified by network monitoring and this resolved the backup issue. It might happen that some other ports from the mentioned range might be used by WMI where this solution might not work. In that case the recommended approach is to make sure that WMI uses only one port by configuring it as mentioned in the following article:<strong> </strong><strong><a href="https://msdn.microsoft.com/en-us/library/bb219447(v=vs.85).aspx">https://msdn.microsoft.com/en-us/library/bb219447(v=vs.85).aspx</a></strong></li>
</ol>
<strong> Written by: Deepak Mishra, Support Engineer</strong>

<strong> Reviewed by: Nitish Nagpal, Support Escalation Engineer</strong>]]></content:encoded>
    </item>
    <item>
      <title>Fatal problem when pushing huge repository to TFS GIT</title>
      <link>https://review.docs.microsoft.com/archive/blogs/dstfs/fatal-problem-when-pushing-huge-repository-to-tfs-git</link>
      <pubDate>Mon, 12 Dec 2016 07:34:22 GMT</pubDate>
      <dc:creator><![CDATA[Nitish Nagpal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dstfs/?p=1956</guid>
      <description><![CDATA[Deepak Kumar Mishra, Support Engineer, EMEA TFS Team, brings this knowledge experience while working...]]></description>
      <content:encoded><![CDATA[<strong><em>Deepak Kumar Mishra</em></strong>, Support Engineer, EMEA TFS Team, brings this knowledge experience while working with one of his customers and this important piece of information might help a lot of users who are using Git repos in tfs and face issue while performing a push operation.

<strong>Issue Description:</strong>

A Customer is trying to push an 18GB Git repository in TFS 2015 Update 3. It worked locally to a local server - but we cannot get it to push to our global TFS server. While pushing the repository via SSH, we get the following errors in a Linux machine:

[xxxx@servername]$ grep tfs .git/config

url = ssh://tfs. servername:22/tfs/collection/teamproject/_git/repo

[xxxx@servername]$ git push

Counting objects: 95405, done.

Delta compression using up to 4 threads.

Compressing objects: 100% (24474/24474), done.

Writing objects: 100% (95405/95405), 18.15 GiB | 8.34 MiB/s, done.

Total 95405 (delta 68425), reused 95401 (delta 68421)

remote: Analyzing objects... (95405/95405) (3030021 ms)

fatal: The remote end hung up unexpectedly

fatal: The remote end hung up unexpectedly

&nbsp;

<strong>Cause:</strong>

This is a bug in TFS related to SSh which will be fixed in upcoming release.

Our SSH framework times out the connection if there is no communication for over 5 minutes. If pushing a massive repo, the server could do over 5 minutes of work ‘silently’, leading to a connection drop.

The workaround is to make the initial push over https and then switch to SSH.

<strong>Troubleshooting and Resolution:</strong>

1.The size of the repository was big and so we tried to reduce the size first by using the following commands.

git gc --prune=now --aggressive

git repack -adf

then push

time git gc --prune=now --aggressive; time  git repack -adf ; time git push

<strong>        The command failed with the following errors:</strong>

<strong>                </strong>fatal: The remote end hung up unexpectedly

fatal: The remote end hung up unexpectedly

2. Then we tried to do a push with Http first and decided to do the next clone and push via SSH. This gave the following error regarding certificate as HTTPS was configured in this case.

fatal: unable to access 'https://tfs.servername/tfs/collection/teamproject/_git/repo/ ': Peer certificate cannot be authenticated with known CA certificates

3. So we informed customer that they were using using a self-signed certificate to allow HTTPS in TFS on-premises They need to permanently add the HTTPS certificate as “trusted” on the machine and ignore the self-sign check for git by using the flag  git -c http.sslVerify=false

4. Then We checked and found that the push operation worked as expected by using Https. [[xxxx@servername]$ git -c http.sslVerify=false push Counting objects: 95405, done. Delta compression using up to 4 threads. Compressing objects: 100% (24499/24499), done. Writing objects: 100% (95405/95405), 18.54 GiB | 4.79 MiB/s, done. Total 95405 (delta 68399), reused 95401 (delta 68395) remote: Analyzing objects... (95405/95405) (3894107 ms) remote: Storing packfile... done (2695635 ms) remote: Storing index... done (936 ms) To 'https://tfs.servername/tfs/collection/teamproject/_git/repo/  * [new branch]          master -&gt; master

5. Finally we were able to do the next clone and then push by using SSH

<strong>Written by: Deepak Kumar Mishra, Support Engineer</strong>

<strong>Reviewed by: Nitish Nagpal, Support Escalation Engineer </strong>]]></content:encoded>
    </item>
  </channel>
</rss>