title: How to add a linked file to a csproj file with MSBuild. (3.5 Framework)
body: <p>I'm trying to us MSBuild to add a linked file to my <code>.csproj</code> file.</p>
  
  <p>This is .Net Framework 3.5 (and not 4.0). I mention that because I'm seen some 4.0 specific stuff trying to manipulate the XML.</p>
  
  <p>Here is what I'm starting with:</p>
  
  <pre><code>&lt;Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"&gt;
    &lt;ItemGroup&gt;
      &lt;Reference Include="System" /&gt;
      &lt;Reference Include="System.Core"&gt;
        &lt;RequiredTargetFramework&gt;3.5&lt;/RequiredTargetFramework&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="System.Data" /&gt;
      &lt;Reference Include="System.Xml" /&gt;
    &lt;/ItemGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;Compile Include="MySuperCoolClass.cs" /&gt;
      &lt;Compile Include="Properties\AssemblyInfo.cs" /&gt;
    &lt;/ItemGroup&gt;
  
    &lt;Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /&gt;
  
  &lt;/Project&gt;
  </code></pre>
  
  <p>This is what I'm trying to get:</p>
  
  <pre><code>   &lt;Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"&gt;
        &lt;ItemGroup&gt;
          &lt;Reference Include="System" /&gt;
          &lt;Reference Include="System.Core"&gt;
            &lt;RequiredTargetFramework&gt;3.5&lt;/RequiredTargetFramework&gt;
          &lt;/Reference&gt;
          &lt;Reference Include="System.Data" /&gt;
          &lt;Reference Include="System.Xml" /&gt;
        &lt;/ItemGroup&gt;
  
        &lt;ItemGroup&gt;
          &lt;Compile Include="MySuperCoolClass.cs" /&gt;
          &lt;Compile Include="Properties\AssemblyInfo.cs" /&gt;
        &lt;/ItemGroup&gt;
  
  
        &lt;ItemGroup&gt;
          &lt;Content Include="..\..\SomeFunFolder\MyLinkFile.ext"&gt;
            &lt;Link&gt;MyLinkFile.ext&lt;/Link&gt;
          &lt;/Content&gt;
        &lt;/ItemGroup&gt;    
  
        &lt;Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /&gt;
      &lt;/Project&gt;  
  </code></pre>
  
  <p>I have:</p>
  
  <ul>
  <li><code>MSBuild.Community.Tasks.dll</code></li>
  </ul>
  
  <p>and</p>
  
  <ul>
  <li><code>MSBuild.ExtensionPack.dll</code></li>
  </ul>
  
  <p>available.</p>
  
  <p>Any concrete help?</p>
  
  <p>One liner comments like <em>use 'MSBuild.ExtensionPack.Xml.XmlFile'</em> won't be helpful.</p>
  
  <p>But I appreciate any pointers or coded examples immensely.</p>