title: Add a link to an existing item during project creation
body: <p>I've created a custom VS template which uses an IWizard class to do some automatic actions when a user creates a project to set project properties and paths, I've managed to set some project properties like build path by saving the .csproj file with parameters inside $ signs and setting those parameters in the replacementDictionary, during the RunStarted method.</p>
  
  <p>Unfortunately I'm having trouble adding items as links to the .csproj using the same method. I have a .cs file I need to add as an existing and as a link item to each project created, it's path would be determined by where the user chooses to save the project. I've got to the part where I know the path of the .cs file, (absolute and relative to the project's path).</p>
  
  <p>Here's what I've tried so far:</p>
  
  <ul>
  <li>Save the .csproj file with a  section for the item, with placeholders for the path:<br>
  <code>&lt;Compile Include="$path_to_cs_file\cs_file_name.cs$"&gt;</code><br>
  <code>&lt;Link&gt;$cs_file_name.cs$&lt;/Link&gt;</code><br>
  <code>&lt;/Compile&gt;</code></li>
  </ul>
  
  <p>I've tried doing this with both absolute and relative paths, but this for some reason makes VS replace the path with a completely different relative path under Documents and Settings\user\Local Settings.  </p>
  
  <ul>
  <li><p>In RunStarted, cast the automationObject as DTE and call it's ItemOperations.AddExistingItem method. Using either path results in errors (The parameter is incorrect).</p></li>
  <li><p>In ProjectFinishedGenerating, save the project's path, then at RunFinished, create a Microsoft.Build.BuildEngine.Project object with that path, call DTE commands to save all files and unload the project, then call the project object's AddNewItem Method and SetMetaData on the resulting ProjectItem, afterwards I save the project and reload it with the DTE object, this, again results the same errors as before</p></li>
  </ul>
  
  <p>I'd appreciate any help with the subject, I'm pretty much stumped. Thank you in advance.</p>