Remove SourceSafe Bindings #5
Chapter 1, Master Projects and Solutions
|
31
HACK
SCC within the opening CSHARP or VisualBasic XML tag. In the preceding sam-
ple file, the four lines starting with
SccProjectName, SccLocalPath, SccAuxPath,
and
SccProvider would all need to be deleted. Save the file and close Note-
pad. You will need to do this for each project file in your application.
With Visual Studio 2005, the project file is a completely different format (it
is now based on MSBuild), but the data you will need to delete is very simi-
lar. Here is the relevant section of the project file:
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' = = '' ">Debug</
Configuration>
<Platform Condition=" '$(Platform)' = = '' ">AnyCPU</Platform>
<ProductVersion>8.0.40903</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{951EBC65-CA21-4C24-B501-DFF2A03A03F1}</ProjectGuid>
<OutputType>Library</OutputType>
<StartupObject>
</StartupObject>
<AssemblyName>SourceSafeBindingRemover</AssemblyName>
<RootNamespace>SourceSafeBindingRemover</RootNamespace>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
</PropertyGroup>
In this example, the elements named SccProjectName, SccLocalPath,
SccAuxPath, and SccProvider would all need to be deleted.
The last thing to do is remove all the files that SourceSafe creates with the .scc
extension. Every directory will contain a file called vssver.scc. Folders with
project files will have an associated mssccprj.scc file. There are also files end-
ing with <Project Name>.csproj.vspscc (vbproj if it is a Visual Basic Project) or
<Solution Name>.etp.vspscc. All of these files should be deleted, and with
that, your application will have all the SourceSafe bindings removed.
Hacking the Hack
I have written a simple Windows application that automates the removal of
SourceSafe bindings using the previous steps. You can download the latest
version from http://workspaces.gotdotnet.com/SourceSafeBindingRemover.
You can see this application in Figure 1-16.
Using it is simple. Select the solution root folder using the Choose Folder
button and click the Remove SourceSafe Bindings button. If the Remove
Bindings? checkbox is unchecked, then the window will show you a pre-
view of all the files that will be deleted. This will help you make sure that
32
|
Chapter 1, Master Projects and Solutions
#5 Remove SourceSafe Bindings
HACK
none of your source code files are accidentally included in the delete list. If
the checkbox is checked, clicking the Remove SourceSafe Bindings button
will remove all SourceSafe bindings from the selected root folder and any
subfolder, recursively.
Currently this tool works only for Visual Studio .NET 2002 and Visual Stu-
dio .NET 2003.
—Darrell Norton
Figure 1-16. SourceSafe Binding Remover

Get Visual Studio Hacks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.