Thursday, November 09, 2006

Share Common Files in Visual Studio

Under normal circumstances, when you add an existing file to a project, Visual Studio makes a copy of the file, local to the project. This is good for isolating breaking changes, but not so good if you want to share a single copy of a file.

An alternative is to share common files, perhaps containing assembly info or a strong name key, that need to be referenced throughout your code base. To link files across projects by using the Add As Link context menu in the Add Existing Item dialog.

Once added, the linked file can be identified in Solution Explorer by the shortcut symbol at the foot of it's icon. The major benefit is that any changes saved to either the original or any linked file are replicated across the original and all linked files immediately.

1 comment:

gabore said...

It also stopped using that stylesheet, so the errormessage is right.