How to make TFS and Git to Play Nice: Taking TFS offline

In the last month I have started using git mainly mysysgit for all of my personal project and Team Foundation Server for work.  A few weeks ago I became aware of the git-tfs project which is an extension to allow you to use a local git repository with a TFS remote. 

One the things that has been a pain is that once you have the project cloned locally it still thinks that it is under source control and every time you open it you have to click through the dialogs.  There are a few workarounds online that show how to take the solution offline by turning off your wireless and unplugging your network card, then open the solution.  When you do this Visual Studio will prompt you to take the solution offline.  I am not a big fan of solutions that require unplugging the network to get a software package to do something it should natively. 

In this post I am going to show you how I was able to get my solution in the offline mode without messing around with the network settings.

So we want the solution to be offline, right? We’ll guess what? There is a Visual Studio Extension for that!  Install the GoOffLine Visual Studio Extension from the Visual Studio Extension Gallery – This extension adds a Go Offline menu option to the File->Source Control menu.

image

 

Now, we need a existing project cloned from TFS or to get a new one.  I am not going to go into the details of how to install and configure git and git-tfs there are several good resources available that cover that topic extensively.  That being said I will point you to the blog post that helped me figure out how to get git-tfs working: Git & TFS Working Together – Version 2 by Richard Banks. 

One hurdle I had to overcome was when I opened the cloned solution, which is not in the workspace, and clicked the Go Offline menu item nothing happened.  What I figured out was since the source code location wasn’t mapped in the workspace it didn’t take it offline.  Which makes sense because it asked during load if I wanted to remove the source control bindings or disable them temporarily.  I disabled them temporarily since I didn’t want to screw up any of the others working on the project that weren’t using git.

To get around this I open my Manage Workspaces and temporarily mapped the solution to the directory where I had the git repository for the solution.  Now when I opened the solution it was bound to TFS Source control and clicking the Go Offline menu option took the project offline.  I think closed the solution and removed the mapping from the workspace.

This leaves Visual Studio in offline mode, even when you want to open a solution that is mapped to TFS.  So to get around that go to File->Source Control->Go Online and it will bring Visual Studio back online and your TFS integration will light up.

When you open your project from the local git version (that is offline) you will see the following dialog.

image

Just click “No” and your solution will open and you can get started coding.

Using this technique will allow you to enjoy all the benefits of using a local version control with Team Foundation Server as the remote.  Today was the first day I have tried this and I hope others can help me figure out if there is a better way to approach this.  I am going to continue down this path and see if there are any gotchas I haven’t come across yet.  If you have a different solution about how to work with git on a project while everyone else is using Team Explorer with TFS I would love to hear it.

Coding Standards: But that will limit my creativity!

At work I have been part of a standards committee with the goal of creating and enforcing a set of standards for .NET development in our organization. Any time I have been involved with the discussion or creation of any kind of developer standards I always hear the same thing, “But that will limit my creativity”.

The standards the committee has put together are a short list of things you should always do, and 3 times as many best practices we wish everyone would do. Many of them are industry standards that are set by default in Visual Studio anyway.

So why do so many developers believe that following a standard for solution, file, and code format will limit their creativity?

writing-musicIn the music industry, if you want to be a song writer you first must learn the language of music. This includes notes; quarter, half and full, as well as, the music staff and how to put the notes on the staff so that people can play the song. I would argue that this adherence to a standard has hardly limited the musician’s creativity. We hear new and different songs on the radio all every day.

I don’t believe that creativity in software development is found in the location of a curly bracket or the structure of an if statement. The creativity in software development comes from how you apply your knowledge of the language and patterns to solve a problem that brings value to your organization.

Even design patterns, which very few have issue with, are a standard approach to solving a problem.  I have never heard someone say implementing a Repository pattern limits their creativity. It more often removes the tedious, mundane task so you can focus on the more interesting parts of the solution, which is where the real creativity exists.

So if you are asked to create, review, or adhere to a standard look at it as a chance to see if you can eliminate time that you would have spent worrying about non-creative menial task of how the code should be written and focus on what code needs to be written to solve the problem at hand.

TechNet: Transforming IT: Virtualization to the Cloud Tulsa, OK - April 26, 2011

Are you ready for the challenge to lead and transform your IT organization?

Cloud computing is emerging as a promising IT service delivery vehicle. But is the question "To cloud or not to cloud"? For you and your organizations, it is crucial to recognize the opportunities and play a key role in the transformation from existing infrastructure-focused IT into a service-oriented, user-centric, and IT-as-a-Service environment.

Join your Microsoft® IT Pro Evangelists for this FREE, half-day event that will help you decide.

Location: Tulsa, OK

Register today at www.technetevents.com

Questions about these events? Contact us at MsNextDe@microsoft.com
Stay Connected - www.facebook.com/msnextdev

EventServer 1.0 Released

logoI am proud to announce that EventServer 1.0 has made it to release status.  The goal of EventServer is to create an application to be used to run multi-session, multi-track, multi-day conference. Much like CodeMash, DevLink, TechFest, CodeCamps, etc.

Event Server is a MicroCMS, meaning that it is an application that is designed to solve a very specific problem that contains some CMS functionality. Event Server is not a CMS which complicated module and theme architectures. Event Server does however have parts of the site that can be updated without requiring the code to be modified. Our focus on in-place administration has taken advantage of CMS like functionality to allow you to spend your time organizing the event, not creating a site for it. The Event Server project has a very narrow focus on the problem we are trying to solve without increasing the skills required to maintain or customize.

Featured included in this release:

  • Pages for Home, Speakers, Sessions, Sponsors, About
  • MicroCMS functionality allowing editing of static HTML content on any page using Live Writer or any MetaWebAPI compliant client.
  • Built in Blog for announcements.
  • Ability to post new announcements on the blog via Live Writer or any MetaWebLogAPI compliant client.
  • Ability to future post announcements
  • Allow potential speakers to Register and Submit session abstracts and bio information online
  • Ability to review and approve or reject sessions (with comments that are sent to the speaker)
  • Ability to assign sessions to a Track and TimeSlot
  • Ability to manager sponsors, add/remove, edit, and assign to sponsorship level
  • Ability to activate/inactive sponsors
  • 100% CSS themes, no complicated theme engines.

Features for vNext:

  • Ability to assign session to a day for multi-day event
  • Ability for attendee to register for the events
  • Ability for attendees to sort session by day

With this release all development has moved to the new project located on GitHub and has become part of the RoundTable family of applications. Even though development has been moved to GitHub public releases will still be made available on the EventServer CodePlex site.

Resources:

Nwa .NET: Windows Phone 7 Launch Event March 8th, 2011

image

You have been hearing a lot about the new Window Phone 7 lately.  Did you miss the bubble with iPhone development because you didn’t want to learn a whole new language and framework?  Then you're invited to a hands-on event for Windows Phone 7. 

Get some help getting your Windows Phone 7 app into the marketplace. You’ll receive everything you need to develop an app—including some good community fun, sample code and templates. You can work individually or collaborate with others as a team.

Chris Koenig, Senior Developer Evangelist with Microsoft will be joining me for this fun, fact filled, dare I say Lab filled event.

Attendees will also receive a special entry card for a chance to win a Windows Phone 7, after your app has been submitted to the marketplace.

Be there!

Get started

  • Download the Toolkit
  • Register at the Windows Phone 7 Marketplace
  • Download the Windows Phone Mobile Advertising SDK to monetize their app

 

Date: March, 8th, 2011
Time: 6:00 P.M. – 9:00 P.M.
Place:

Technology 101
105 SE 22nd St, Suite #7
Bentonville, AR 72712


Please RSVP: nwadnug032011.eventbrite.com

Calendar

<<  April 2024  >>
MonTueWedThuFriSatSun
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

View posts in large calendar

Widget Category list not found.

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))X

Tag cloud

    Widget Month List not found.

    Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))X

    Widget AuthorList not found.

    Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))X

    Widget TextBox not found.

    Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))X