Working with Visual Studio.NET
Putting additional Visual Studio.NET projects under Code Co-op
control
After your Visual Studio.NET solution is under version control, you might add
new Visual Studio.NET projects to it. To add these projects to your Code Co-op
project, it's simplest to let Visual Studio.NET add it for you. And to make it
easy to see which files are being added and changed, it's best not to have
other files in the project checked out when you are adding a new project to
version control.
- In Visual Studio.NET, open your solution and in the Solution Explorer click on
the project you want to add to source control. Now click on the File menu,
select Source Control, and further select Add Selected Projects to Source
Control.
- close the solution in Visual Studio.NET
- In Code Co-op, click on the Check In Area tab and you'll see all the
newly added files. Select the Click on the All menu menu item and select Check
In. Enter a comment (e.g. New subproject), and click OK. The
files are now checked in to the Code Co-op project.
Your new Visual Studio.NET project is now fully integrated with your Code Co-op
project. You can open the solution in Visual Studio.NET and get to work.
Opening a Code Co-op project in Visual Studio.NET
If you joined a Code Co-op project that was already integrated with Visual Studio.NET you
do not have to do anything in order to integrate. You can just open the solution in Visual Studio.NET
(an easy way to do this within Code Co-op is to right click on the .sln file and
select Open with Shell) and you can start working with it immediately.
Renaming Solutions
Renaming a solution in Visual Studio.NET can cause problems and is not
recommended. If you must rename a solution, here's a sequence that will work.
In this example, we're renaming a solution from Original to KillerApp:
- In Code Co-op, check out Original.sln and Original.vssscc
- Start Visual Studio.NET and open the solution.
- Right click on the solution item (at the top of the Solution Explorer window),
select Rename and enter the new name.
- If a warning dialog appears, click Continue with Change
- Close the solution
- In Code Co-op, go to the Check-in Area tab and Un-CheckOut Original.sln and Original.vsscc (the files you checked out in step #1)
- Go to the Files tab and Delete Original.sln and Original.vsscc
- Select KillerApp.sln and KillerApp.vsscc, click on the Selection menu and select Add To Project
- Go to the Check-in Area tab, select KillerApp.sln and KillerApp.vsscc and check them in.
You have now successfully renamed your Visual Studio.NET solution.
Upgrading from Visual Studio 6.0 to Visual Studio.NET with
sub-projects
Upgrading from Visual Studio 6.0 to Visual Studio.NET may produce binding
errors if you have sub-projects in VS 6.0. Before outlining the solution, keep
in mind that VS.NET organizes development into two layers:
- Top-level solution described by a file with the extension .sln in the root
directory of the solution tree
- One or more (sub-)projects that could be in the subtrees of the solution tree.
If these are C/C++ projects, they are described by files with the extension
.vcproj. Their format is XML, which can be edited (with care!).
To fix the integration with VS.Net, do the following:
- Open the dialog File>Source Control>Change Source Control. You can add
one more column, Relative Path, to this display
- You should see there the paths to your subprojects relative to the code co-op
root
- If not, go to the corresponding directory, check out the .vcproj file and
correct the line that looks like this: SccLocalPath=".."
- Put " .. " there if the project directory is one level below the
co-op project root, etc
Visual Studio.NET Web Solutions and Code Co-op Control
VS.NET treats Visual Basic , Visual C# and Visual J# Web Solutions in a special way. Adding them to
source control requires an additional change in VS.NET configuration.
Also the process of joining a Web Solution differs from a standard procedure and
has its own specific requirements.
Note: You do not have to do any of these for Visual C++ Web Solutions.
Before you create a Web Solution you must set the VS.NET default project directory
to point to your system's default web publishing folder (usually "c:\inetpub\wwwroot").
To do this, open the Options dialog from the VS.NET Tools
menu and change the default directory in the Environment.Projects and
Solutions section.
Joining an existing Web Solution on the same computer more than once is
essentially impossible.
When joining an existing Web Solution from other computers you must be aware of
the following requirements:
- all users have to use localhost for the server name
- a project location under the localhost have to
be the same for these users (e.g. http://localhost/webproject1)
- an absolute path to the project must be the same
on all computers (e.g. c:\inetpub\wwwroot\webproject1)
After you joined an existing Web Solution you will be initially
unable to open the solution in VS.
You will need to ask the sender of the Full Sync to
send you a copy the ".suo" file. Do not add this file under Co-op's control! The .suo file is a VS file and is placed
in the root folder of the solution. The sender might not see the .suo file
in the explorer if s/he does not have "show hidden files" option set
(it has the Hidden attribute). But the sender can always see the .suo
in Code Co-op's display and drag and drop it to an e-mail message.
By the way, make sure you add ".webinfo" files under Co-op's control.
VS does not add them by default when Adding Solution to Source Control.