How do I remove VSS hooks from a VS Web Site?
Question: I have a Visual Studio 2008 solution with 7 various projects included with it.
3 of these 'projects' are Web Sites (the kind of project without a project
file).

I have stripped all the various Visual Sourcesafe files from all the
directories, removed the Scc references in the SLN file and all the project
files that exist. I deleted the SUO file and all the USER files also. Visual
Studio still thinks that 2 of the Web Sites are still under source control,
and it adds the Scc entries back into the SLN file for me.

**Does anybody know _how_ VS still knows about the old source control?**

_Edit:_ Another thing that I didn't mention is that the files I'm trying to
remove VSS hooks from has been copied outside of VSS's known working
directories, the python script run and manual edits to files made before the
solution is opened in VS 2008 or VS 2005 (I had the problem with both).

Here is a python script that I used to weed out these files and let me know
which files needed manually edited.

    
    
    import os, stat
    from os.path import join
    
    def main():
      startDir = r"C:\Documents and Settings\user\Desktop\project"
    
      manualEdits = []
    
      for root, dirs, files in os.walk(startDir, topdown=False):
        if '.svn' in dirs:
          dirs.remove('.svn')
        for name in files:
          os.chmod(join(root,name), stat.S_IWRITE)
          if name.endswith(".vssscc") or name.endswith(".scc") or name.endswith(".vspscc") or name.endswith(".suo") or name.endswith(".user"):
            print "Deleting:", join(root, name)
            os.remove(join(root,name))
          if name.endswith("sln") or name.endswith("dbp") or name.endswith("vbproj") or name.endswith("csproj"):
            manualEdits.append(join(root, name))
    
      print "Manual Edits are needed for these files:"
      for name in manualEdits:
        print name
    
    if __name__ == "__main__":
      main()
    


Answer: It probably is only trying to add it on your instance of VS. You have to
remove the cache so VS thinks its no longer under SS

  1. under file -> SourceControl -> Workspaces
  2. Select the SS location
  3. Edit
  4. Choose the working folder
  5. Remove!

