Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS: How do I view .cs files in the VS IDE when viewing details of a shelveset?

For our code review process we open the details of a shelveset to see all files that have been worked on. Right clicking and choosing "Compare" works great for existing ( modified ) files. But, when a file has been added I just want to view the file. Double clicking ( or right click -> view ) opens .cs ( and .sql )files in notepad. When I try to open a .PRC file ( extension for our stored procedures ) I get a prompt that allows me to choose what program to use for viewing.

Does anyone know how to get this prompt to show up for .cs files ( and all other files, for that matter )

Thanks!

Configuration: Visual Studio 2008 SP1 Visual Studio 2008 Team Explorer .net 3.5 SP1 Team Foundation Server 2005

like image 732
JoshTheL Avatar asked Oct 26 '09 18:10

JoshTheL


1 Answers

Double clicking ( or right click -> view ) opens .cs ( and .sql )files in notepad. When I try to open a .PRC file ( extension for our stored procedures ) I get a prompt that allows me to choose what program to use for viewing.

This isn't really a TFS issue, but more to do with how your local Windows is set up. If you navigate in Windows Explorer to a folder with .cs and .sql files in, and double-click them, you will be able to see that TFS is simply invoking the standard behaviour that is configured for these files.

To change it, again in Windows Explorer, go to Tools | Options, and on the File Types tab find the .cs file extension, and with it selected click Delete. Now attempting to open a .cs file will make Windows ask you what to do with it (note that if you check the 'Always use the selected program to open this kind of file' checkbox, you will be back where you started).

This is a global setting - I don't know if there's a way to make TFS do something different from just asking Windows to deal with the file. So if you want to keep the ability to launch notepad when double-clicking .cs files in Explorer, but still have TFS ask what to do with them, this won't help. Also, these instructions are pre-Vista - I don't know what's changed in Vista. You might want to ask on superuser.com what to do if you're on Vista and these instructions don't help.

like image 127
AakashM Avatar answered Nov 27 '22 09:11

AakashM