I'm having problem with Team Foundation Server (TFS) when viewing .cs files and need to delete the file association with .cs in Windows 7. At the moment I go to Control Panel -> Default Programs trying to do this, but it seems to have no way to delete other than change the current association. So, how can I do it?
Open an elevated command prompt with administrator privileges.
Remove the file extension association from its assigned file. Type in the following command and press Enter:
Replace .ext with the extension name that needs to be disassociated. For example, to disassociate WinRAR's .rar extension, simply type:
assoc .rar =
Note that after disassociation of a file extension from file type, the default program for the file type will no longer be shown in the "Open With" list for the file extension.
Clear and delete the default program used for the Open command when launching files of this type. Enter the following command and press Enter:
Replace "FileType" with the actual name for the file type associated to the file extension to be removed from the system. For example, for WinRAR, type
Note that if you don't know the correct "FileType", simply type
assoc(associated file type will be shown after the extension) or
ftypeto get a listing of all file types defined in the system.