Step one:
Install Team Explorer on your CRM Server.
Step two:
Get hold of the dll:s, you can get them though downloads, or complete source code and compile it yourself.
Step three:
Preparation:
put dll in place: "C:\Program Files\Microsoft Dynamics CRM\Server\bin\assembly\CrmVersionhandler2011.dll"
Setup a folder for TFS to use as a working folder, i.e. "C:\SomeLocalFolder\to\store\customizations"
Setup a TFS folder you can add the customizations in, i.e. "$/tfs/path"
Setup a service account to TFS (you might not want to user CRM User, NetworkService, to have access to your TFS).
Adding to CRM:
Open Plugin Registration tool and add the dll (don't forget to change to "Disk":
and two steps, one on "publish" and one on "Publish all" like this:
Done