Archive for October, 2008

Oct 17 2008

Microsoft Released SilverLight 2

Published by under General

Microsoft Released the full version of SilverLight 2. This is the promotional picture from Microsoft web site:

SilverLight 2 released

I know several of my friends are using Adobe Flex to develop RIA. But with Silverlight, developers can use .NET. I am personally familiar with Microsoft technologies and Silverlight looks promising to me.

To see what Silverlight can do, please visit this page: http://silverlight.net/Showcase/

Comments Off

Oct 16 2008

Using Visual SourceSafe – Cloak

Published by under SourceSafe

This article is a part of SourceSafe / VSS Tutorial

Cloak is a useful little function in version control. It allows us to specify the projects to be ignored during recursive operations such as Get, Check In, Check Out, and Undo Check Out.

 

Why Cloak

Some of the subprojects may never or rarely be used. However, when we do some recursive operations like Get, all the sub files and folders are operated.

For example, the help document needs to be updated whenever a new release comes out. It takes a long time to get the whole project of the help document, especially the image files. To improve efficiency, we can put all the image files in a subproject and cloak it. This way, the subproject cloaked will not be downloaded to local when getting the whole project.

 

To Cloak a Visual SourceSafe Project

To cloak a project, we need to launch the Project Properties dialog first: right click the target project and select Properties.

Cloak – Launch the project Properties dialog
(Cloak – Launch the project Properties dialog)

 

In the General tab of the project Properties dialog, we check the This project is Cloaked for me checkbox to cloak a project, as seen in the following figure:

Cloak a Visual SourceSafe project
(Cloak a Visual SourceSafe project)

 

When a project is cloaked, the icon of the project is turned to grey. To de-cloak a project, just simply uncheck the This project is Cloaked for me checkbox in the project Properties dialog.

 

How Cloak Works

If a project is cloaked, Get, Check In, Check Out, Undo Check Out, and Project Difference operations do not apply to the project when we do these operations on the cloaked project’s parent project. But when we do these operations on the cloaked project itself, these commands still work as normal.

For example: Suppose that we work on a project called $/OurApp. In this project there are subprojects called Code and Tests that we need and another subproject called Docs, which we almost never use. Now, we cloak the Docs project and recursively Get $/OurApp, the Docs project (and its subprojects) will be ignored.

How Cloak Works

 

However, it does not mean that we cannot get a cloaked project. For example, if we want to get all the sub files and folders in the $/OurApp/Docs project which is cloaked, we can make the focus on the project (like clicking on the project) and then perform Get operation.

Once a project is cloaked, VSS will record the name and location of the project. If you delete or purge the project and create a new project with the same name in the same location, VSS will cloak the new project automatically. If a project is renamed or moved, the project will lose the cloak information. So besides unchecking the This project is Cloaked for me checkbox in the project Properties dialog, we can rename or move the project to another place to de-cloak a project. ^_^

 

SourceAnywhere - the SQL Server-based SourceSafe Replacement The SQL Server-based source control Software Designed to be a SourceSafe Replacement SourceAnywhere for VSS - the Fastest SourceSafe Remote Access Tool Recommended by Microsoft The Fastest SourceSafe Remote Access Tool Recommeded by Microsoft

Links:
Previous article <<<<: Branch in SourceSafe / VSS
Next article >>>>: Label in SourceSafe / VSS
SourceSafe How To series home page: VSS / SourceSafe Tutorial

Comments Off

Oct 16 2008

Using Visual SourceSafe – Branch

Published by under SourceSafe

This article is a part of SourceSafe / VSS Tutorial

As we talked about in our last post Share, share is only a small function in version control. It should be combined with Branch to play a greater role. This article will talk about the following topics: Introduction to Branch, Why Branch, How to Branch and How to Track Different Branches.

 

Introduction to Branch

After a file is shared in several projects, modifications to the file in one project are automatically propagated to all sharing projects. This feature has great advantages in some cases. However, sometimes we may want the file and its counterparts to be independent. That is when Branch comes to handy.

VSS allows us to branch a shared file with the Branch command. After branching, the file and its counterparts will be independent, and changes made to the file will not be reflected elsewhere. We can use Merge Branches to merge the branches back.

 

Why Branch

The Visual SourceSafe Branch command breaks the shared link between copies of the file, making the file versions independent and able to be part of separate projects. Here are two common scenarios in which we need Branch:

  • Suppose that after we released a new Version 3.0, the R&D team starts working toward the next major release, the 4.0 version with new features and functions. We can implement it by branching all files into a new project $/Project4. If our users find bugs or need minor features in Version 3.0, we may need to work out a maintenance version, say, Version 3.1. In this case, we can create a new project named $/PATCH to represent the 3.1 version, and branch all the files from Version 3.0. Then some specific developers can fix bugs in the PATCH project while the other team members stay on the 4.0 version development.

Branch scenario 1
(Branch scenario 1)

  • Suppose that we are working on two projects which are virtually identical for two clients. We need to tailor program behavior in one or two files. First, we share the project $/CLIENT1 to a new project $/CLIENT2 recursively. Next, we select the few files we want to tailor in $/CLIENT2 and branch them. Now, when we modify these specific files in $/CLIENT2, the changes do not propagate to $/CLIENT1. All the other files, however, are still shared between the two projects. So, if we modify any of the shared files, the changes will be propagated.

 

How to Branch

How to Branch Shared Files

Visual SourceSafe allows us to branch a shared file using the Branch command:

  1. Select the shared file(s) to branch in Visual SourceSafe Explorer.
  2. On the Versions menu, click Branch.
  3. On the Branch dialog box, type a comment in the Comment box if necessary. Then we can click OK to finish the operation.

Branch shared files using versions menu
(Branch shared files using versions menu)

 

How to Share and Branch

The Share command supports branching of a file immediately after sharing it. To share and branch, we can use Share on the Versions menu:

  1. In VSS Explorer, select the project to which the file(s) is branched.
  2. On the Versions menu, click Share to.
  3. In the Share to dialog box, use the File to share box to select the name of the file to share with the selected project.
  4. Click Share with the Branch after share option checked.

Branch after share
(Branch after share)

 

OR, we can use drag and drop:

  1. In Visual SourceSafe Explorer, right-click a file.
  2. Drag the item over the receiving project and drop the item.
  3. In the resulting menu, click Share and Branch.

 

How to Track Different Branches

When we branch a file after sharing, the Links tab for file properties no longer shows a file relationship. However, we can track the different branches by right-clicking on the branched file, and then clicking Properties -> Paths tab.

Branch links
(Branch links)

 

After the file branches are modified in different projects separately, we can bring them back together using the Merge Branches command. To learn more details, please refer to another article File Merge.

 

SourceAnywhere - the SQL Server-based SourceSafe Replacement The SQL Server-based source control Software Designed to be a SourceSafe Replacement SourceAnywhere for VSS - the Fastest SourceSafe Remote Access Tool Recommended by Microsoft The Fastest SourceSafe Remote Access Tool Recommeded by Microsoft

Links:
Previous article <<<<: Share in SourceSafe / VSS
Next article >>>>: Cloak in SourceSafe / VSS
SourceSafe How To series home page: VSS / SourceSafe Tutorial

6 responses so far

Oct 15 2008

Using Visual SourceSafe – Switching Visual Studio projects from SourceSafe to other SCC providers

Published by under SourceSafe

This article is a part of SourceSafe / VSS Tutorial

If you previously used SourceSafe to source control your Visual Studio projects and then find a better source control tool, you may need to switch the projects under SourceSafe to the new SCC (source code control) provider.

In the following steps, I use SourceAnywhere Standalone, the SQL-based SourceSafe replacement/alternative, as the target source control provider.

 

Switching Visual Studio 2005/2008 projects
Switching Visual Studio .NET 2003/Visual Studio 6.0 projects

 

For Visual Studio 2005/2008

1. Open the solution in Visual Studio.

2. Make the solution and project files writable so that the unbind info can be written. You can check out the solution recursively. Or at a minimum you should check out the solution and project files. Or you can modify the file attribute to be writable manually.

Check out the solution
(Check out the solution)

 

3. Unbind the solution and projects from SourceSafe through Visual Studio menu File -> Source Control -> Change Source Control.

Unbind VS2008 solution/project
(Unbind VS2008 solution/project)

 

4. Close Visual Studio and then re-open it.

5. Select SourceAnywhere Standalone as the current source control plug-in through Visual Studio menu Tools -> Options -> Source Control.

Select SourceAnywhere Standalone as the current source control plug-in
(Select SourceAnywhere Standalone as the current source control plug-in)

 

6. Add the solution into the source control of SourceAnywhere Standalone. You can right-click the solution file in the Solution Explorer and click Add Solution to Source Control. Or you can find the option through Visual Studio menu File -> Source Control.

Add solution into source control of SourceAnywhere Standalone
(Add solution into source control of SourceAnywhere Standalone)

 

For Visual Studio .NET 2003/Visual Studio 6.0

1. Open the solution in Visual Studio.

2. Unbind the solution and projects with SourceSafe.

  • For Visual Studio .NET 2003, go to menu File -> Source Control -> Change Source Control.

Unbind VS 2003 solution/project
(Unbind VS 2003 solution/project)

 

  • For Visual Studio 6.0, click menu Project -> Source Control -> Remove from Source Control.

Remove VS 6.0 files from source control
(Remove VS 6.0 files from source control)

 

3. Close Visual Studio.

4. Choose SourceAnywhere Standalone as the current SCC provider.

To do that, you can use the SCC Provider Manager utility which can be launched from the SourceAnywhere Standalone Client program group.

Choose SCC Provider using SCC Provider Manager
(Choose SCC Provider using SCC Provider Manager)

Or you can do it through registry: http://support.microsoft.com/kb/319318

5. Open the solution in Visual Studio.

6. Add the solution into the source control of SourceAnywhere Standalone.

  • For Visual Studio .NET 2003, right-click the solution file in the Solution Explorer and click Add Solution to Source Control or click menu File -> Source Control -> Add Solution to Source Control.

Add VS 2003 solution into source control of SourceAnywhere Standalone
(Add VS 2003 solution into source control of SourceAnywhere Standalone)

 

  • For Visual Studio 6.0, right-click the files and click Add to Source Control or click menu Project -> Source Control -> Add to Source Control.

Add VS 6.0 files into source control of SourceAnywhere Standalone
(Add VS 6.0 files into source control of SourceAnywhere Standalone)

 

Now the solution is in the source control of SourceAnywhere Standalone. And next time you open the solution, Visual Studio will prompt the Login dialog box of SourceAnywhere Standalone to connect to the server.

 

SourceAnywhere - the SQL Server-based SourceSafe Replacement The SQL Server-based Source Control Software Designed to be a SourceSafe Replacement SourceAnywhere for VSS - the Fastest SourceSafe Remote Access Tool Recommended by Microsoft The Fastest SourceSafe Remote Access Tool Recommeded by Microsoft

Links:
Previous article <<<<: Using SourceSafe in Visual Studio 2005 & 2008
Next article >>>>: Integrating SourceSafe / VSS with Visual C++ 6.0
SourceSafe How To series home page: VSS / SourceSafe Tutorial

One response so far

Oct 14 2008

Microsoft just released Silverlight 2 Release Candidate 0

Published by under General

Today I got an email from Microsoft MSDN Flash with the news that Microsoft just released Silverlight 2 Release Candidate 0.

For those who do not know about Silverlight, Silverlight is a Microsoft tool to build a RIA (Rich Internet Application).
http://en.wikipedia.org/wiki/Rich_Internet_application

Much to Microsoft’s dismay, even though Microsoft launched massive marketing campaigns to promote Silverlight, it seems development teams like Adobe AIR and FLEX better.

For what’s new in Silverlight 2, please refer to:
http://silverlight.net/GetStarted/overview.aspx

Comments Off

« Prev