<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>TFS Version Control and VS Integration : Integration</title><link>http://blogs.msdn.com/benryan/archive/tags/Integration/default.aspx</link><description>Tags: Integration</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>When and how does my solution go "offline"?</title><link>http://blogs.msdn.com/benryan/archive/2007/12/12/when-and-how-does-my-solution-go-offline.aspx</link><pubDate>Wed, 12 Dec 2007 21:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6749793</guid><dc:creator>benryan</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/benryan/comments/6749793.aspx</comments><wfw:commentRss>http://blogs.msdn.com/benryan/commentrss.aspx?PostID=6749793</wfw:commentRss><description>&lt;P&gt;TFS 2008 adds improved support for "offline" scenarios.&amp;nbsp; This blog post identifies the scenarios under which a solution will be placed in "offline" mode.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;If the Visual Studio IDE is unable to connect to the TFS server when it is &lt;STRONG&gt;&lt;U&gt;opening&lt;/U&gt;&lt;/STRONG&gt; the solution, then it will &lt;STRONG&gt;mark the solution&lt;/STRONG&gt; as being offline.&amp;nbsp; It will also &lt;STRONG&gt;mark the TFS server&lt;/STRONG&gt; as being offline.&lt;BR&gt;&lt;BR&gt;A messagebox will be displayed indicating the solution was taken offline and a message to the same effect will appear in the Output window.&lt;BR&gt;&lt;BR&gt;-OR-&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;If the Visual Studio IDE is opening a solution and finds the TFS server to which the solution is bound is marked as offline, then VS will &lt;STRONG&gt;mark the solution&lt;/STRONG&gt; as being offline&lt;BR&gt;&lt;BR&gt;In this scenario, a message about the solution being opened offline will appear in the Output window, but &lt;STRONG&gt;&lt;U&gt;no messagebox will appear&lt;/U&gt;&lt;/STRONG&gt;.&lt;/LI&gt;&lt;/OL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;NOTES&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Offline detection is done ONLY during solution open&lt;/STRONG&gt;.&amp;nbsp; Failures to connect to the server during other version control operations within VS do &lt;U&gt;not&lt;/U&gt;&amp;nbsp;affect the offline state of the solution or server.&lt;BR&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;The offline state for the solution is stored in the solution's local .suo file.&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;When the server is marked offline, we also turn off the server's "AutoReconnect" setting.&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;The server's offline state is stored in a registry value named &lt;EM&gt;&lt;STRONG&gt;Offline,&lt;/STRONG&gt;&lt;/EM&gt; and the AutoReconnect state is stored in in a value named &lt;STRONG&gt;&lt;EM&gt;AutoReconnect&lt;/EM&gt;&lt;/STRONG&gt;.&amp;nbsp; Both of these live under the key: &lt;BR&gt;HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\Servers\&lt;EM&gt;&amp;lt;tfs server name&amp;gt;&lt;BR&gt;&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;A solution remains offline until it is explicitly taken online.&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;A TFS&amp;nbsp;server remains marked offline until an offline solution bound to that server is taken online.&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Opening a solution that was previously marked offline while its server is still marked offline opens the solution without any messageboxes appearing.&amp;nbsp; We will present a message in the Output window indicating the solution is still offline.&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Opening a solution that was previously marked offline when its server is marked online&amp;nbsp;presents the user with a messagebox asking if the user wishes to take the solution online.&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6749793" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/benryan/archive/tags/Team+Foundation/default.aspx">Team Foundation</category><category domain="http://blogs.msdn.com/benryan/archive/tags/Integration/default.aspx">Integration</category><category domain="http://blogs.msdn.com/benryan/archive/tags/TFS+Version+Control/default.aspx">TFS Version Control</category><category domain="http://blogs.msdn.com/benryan/archive/tags/TFS+2008/default.aspx">TFS 2008</category><category domain="http://blogs.msdn.com/benryan/archive/tags/Offline/default.aspx">Offline</category></item><item><title>How to make a project compatible with VS source control integration</title><link>http://blogs.msdn.com/benryan/archive/2006/12/22/how-to-make-a-project-compatible-with-vs-source-control-integration.aspx</link><pubDate>Fri, 22 Dec 2006 21:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1349170</guid><dc:creator>benryan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/benryan/comments/1349170.aspx</comments><wfw:commentRss>http://blogs.msdn.com/benryan/commentrss.aspx?PostID=1349170</wfw:commentRss><description>&lt;P&gt;The following are the necessary mininum steps required to integrate a new project type with source control within Visual Studio.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The project must implement &lt;STRONG&gt;Microsoft.VisualStudio.Shell.Interop.IVsSccProject2&lt;/STRONG&gt; (&lt;A class="" title=IVsSccProject2 href="http://msdn2.microsoft.com/en-gb/library/microsoft.visualstudio.shell.interop.ivssccproject2(VS.80).aspx" mce_href="http://msdn2.microsoft.com/en-gb/library/microsoft.visualstudio.shell.interop.ivssccproject2(VS.80).aspx"&gt;documentation&lt;/A&gt;).&lt;BR&gt;&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;EM&gt;&lt;STRONG&gt;GetSccFiles&lt;/STRONG&gt;&lt;/EM&gt; - return which files are controllable for the given item ID&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;&lt;STRONG&gt;GetSccSpecialFiles&lt;/STRONG&gt; &lt;/EM&gt;- return hidden files for the given item ID&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;&lt;STRONG&gt;SetSccLocation&lt;/STRONG&gt;&lt;/EM&gt; - persist the SCC settings to the project file&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;&lt;STRONG&gt;SccGlyphChange&lt;/STRONG&gt;&lt;/EM&gt; - notifies project that changes have been made to the indicated items' SCC glyphs&lt;BR&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;The project must utilize &lt;STRONG&gt;Microsoft.VisualStudio.Shell.Interop.IVsSccManager2&lt;/STRONG&gt; (&lt;A class="" title=IVsSccManager2 href="http://msdn2.microsoft.com/en-us/library/microsoft.visualstudio.shell.interop.ivssccmanager2(vs.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/microsoft.visualstudio.shell.interop.ivssccmanager2(vs.80).aspx"&gt;documentation&lt;/A&gt;).&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;RegisterSccProject&lt;/EM&gt;&lt;/STRONG&gt; - call when the project is opened&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;&lt;STRONG&gt;UnregisterSccProject&lt;/STRONG&gt; &lt;/EM&gt;- call when the project is closed&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;GetSccGlyphs&lt;/EM&gt;&lt;/STRONG&gt; - call to get source control glyphs and source control status&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;The project must utilize &lt;STRONG&gt;Microsoft.VisualStudio.Shell.Interop.IVsQueryEditQuerySave2&lt;/STRONG&gt; (&lt;A class="" title=IVsQueryEditQuerySave2 href="http://msdn2.microsoft.com/en-us/library/microsoft.visualstudio.shell.interop.ivsqueryeditquerysave2(vs.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/microsoft.visualstudio.shell.interop.ivsqueryeditquerysave2(vs.80).aspx"&gt;documentation&lt;/A&gt;).&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;QueryEditFiles&lt;/EM&gt;&lt;/STRONG&gt; - call before editing a file in the project to notify listeners (e.g. SCC)&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;QuerySaveFiles&lt;/EM&gt;&lt;/STRONG&gt; - call before saving a file in the project to notify listeners (e.g. SCC)&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;The project must utilize &lt;STRONG&gt;Microsoft.VisualStudio.Shell.Interop.IVsTrackProjectDocuments2&lt;/STRONG&gt; (&lt;A class="" title=IVsTrackProjectDocuments2 href="http://msdn2.microsoft.com/en-us/library/microsoft.visualstudio.shell.interop.ivstrackprojectdocuments2(vs.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/microsoft.visualstudio.shell.interop.ivstrackprojectdocuments2(vs.80).aspx"&gt;documentation&lt;/A&gt;)&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;OnQuery*&lt;/EM&gt;&lt;/STRONG&gt; - call before attempting the add/rename/move/etc. operation to notify listeners (e.g. SCC) and to give listeners the chance to veto the attempt.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;OnAfter*&lt;/EM&gt;&lt;/STRONG&gt; - call after the operation has been performed to permit listeners (e.g. SCC) to perform related operations (e.g. pend an SCC add).&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;To permit SCC commands to show in the context menus, the menu should contain the following groups:&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;guidSHLMainMenu::IDG_VS_CTXT_SOLUTION_SCC&lt;/EM&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;guidSHLMainMenu::IDG_VS_CTXT_PROJECT_SCC&lt;/EM&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;guidSHLMainMenu::IDG_VS_CTXT_ITEM_SCC&lt;/EM&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/OL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1349170" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/benryan/archive/tags/Integration/default.aspx">Integration</category><category domain="http://blogs.msdn.com/benryan/archive/tags/Version+Control/default.aspx">Version Control</category><category domain="http://blogs.msdn.com/benryan/archive/tags/SCC/default.aspx">SCC</category><category domain="http://blogs.msdn.com/benryan/archive/tags/TFS+Version+Control/default.aspx">TFS Version Control</category></item><item><title>Introduction</title><link>http://blogs.msdn.com/benryan/archive/2006/12/21/introduction.aspx</link><pubDate>Thu, 21 Dec 2006 22:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1342000</guid><dc:creator>benryan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/benryan/comments/1342000.aspx</comments><wfw:commentRss>http://blogs.msdn.com/benryan/commentrss.aspx?PostID=1342000</wfw:commentRss><description>&lt;P&gt;&lt;STRONG&gt;About Me&amp;nbsp;&lt;BR&gt;&lt;/STRONG&gt;My name is Ben Ryan, and I have been involved with developing the Team Foundation Server version control client for the last three and a half years here at the Microsoft office in Durham, NC.&amp;nbsp; During most of that time, I have been working on the low level source control integration of Team Foundation Server within Visual Studio.&amp;nbsp; As time allows, I assist my coworker, Michal Malecki (&lt;A href="http://blogs.msdn.com/michalma"&gt;http://blogs.msdn.com/michalma&lt;/A&gt;), with the TFS MSSCCI PlugIn.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;I have 14 years of software development experience that span several companies and numerous software projects.&amp;nbsp; My previous employers include:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Ateb - C development on Linux-based signature capture appliance&lt;/LI&gt;
&lt;LI&gt;Alerts.com - Java development of a distributed messaging service&lt;/LI&gt;
&lt;LI&gt;HAHT - Integration of Java VM within native Windows and UNIX HAHTsite server application&lt;/LI&gt;
&lt;LI&gt;Data General (now part of EMC) - C development within DG/UX kernel's TCP/IP protocol stack&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;This list is not all inclusive, but it does offer a representative sampling of my background.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Blogging Topics&lt;/STRONG&gt;&lt;BR&gt;For starters, I intend to blog about Visual Studio source control integration.&amp;nbsp; Ideally, I'll cover both what is involved with making a new project type compatible with integrated source control and how a source control provider interacts with Visual Studio.&amp;nbsp; Hopefully, the latter discussions will provide some insight into how TFS operates within Visual Studio and why it operates that way.&lt;/P&gt;
&lt;P&gt;After that, I'm not sure what I'll blog about.&amp;nbsp; I'm not too concerned given that the mysteries of the source control integration layer should provide me with blogging fodder for months to come.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1342000" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/benryan/archive/tags/Team+Foundation/default.aspx">Team Foundation</category><category domain="http://blogs.msdn.com/benryan/archive/tags/Integration/default.aspx">Integration</category><category domain="http://blogs.msdn.com/benryan/archive/tags/Version+Control/default.aspx">Version Control</category><category domain="http://blogs.msdn.com/benryan/archive/tags/SCC/default.aspx">SCC</category></item></channel></rss>