Wednesday, 2 January 2013

Adding EF5 POCO’s to TFS Source Control

While attempting to build my TFS based solution, the build failed reporting that it couldn’t find my EF5 POCO Classes.

After some digging around it seems that these files aren’t automatically included under TFS Source Control.

In order to enable this (For VS 21012), we must perform the following actions;

1. Open the Team Explorer Window using View>Team Explorer
2. You will see a list of shortcuts... My Work, Pending Changes and so on;
3. Under "Pending Changes" is a link to "Source Control Explorer"
4. Click this link, to open the Source Control Explorer Window
5. Navigate through your solution to the Project containing your edmx file
6. Above the "Source Location" will be a toolbar
7. The fourth icon from the left is "Add Items To Folder"
8. Clicking this icon will bring up the "Add to Source Control" Dialog, showing all the files in this project which aren't currently under Source Control.
9. Select all the files you wish to now include under Source Control
10. Press Next, then Finish

Now Check In your Solution again, and your POCO's should now be included.

As a word of warning, I have read that it’s possible to get Read / Write issues when performing this action. Allegedly, checking out the problem items will overcome this issue.

No comments:

Post a Comment