Hi Tony:
The AddFilesToCSharpProject uses templates and does the following (more or
less):
- It gets the template file.
- It copies it with a temporary name to a temporary folder.
- It perform some replacements of the template placeholders by actual values
(class name, etc.)
- It copies the modified temporary template to the destination folder.
- It removes the temporary template
- It opens the file
The key is that the wizard uses:
var projfile = projItems.AddFromTemplate(strFile, strTarget);
The ProjectItems collection class has 4 methods to add files:
AddFromDirectory, AddFromFileCopy, AddFromFile, AddFromTemplate.
Both AddFromTemplate and AddFromFileCopy, by definition, copy the file to
the destination folder. If you want to link a file rather than copying it,
you should use AddFromFile. Finally, just for completeness, AddFromDirectory
copies all files of the given directory recursively to the target directory.
Another approach instead of using AddFromFile in the script is to use a
modified project template which already contains the linked files, and
therefore the script does not have to deal with them.
For more information, check the help files of Visual Studio about those
methods. Also, chapter 9 "Visual Studio .NET Wizards" of the book "Inside
Microsoft Visual Studio .NET", Microsoft Press, by Craig Skibo and others is
also invaluable.

Signature
Best regards,
Carlos J. Quintero
MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
>I have created my own derivative of the C# DLL
> wizard (New Class Library), and I need to link
[quoted text clipped - 12 lines]
>
> Any tips are appreciated.