title: Working with multiple versions of Visual Studio
body: <p>I'm trying to find a way of being able to use multiple versions of Visual Studio on the same set of projects.  The majority of our team uses 2008, but I am trying out 2010.  All projects are C#.</p>
  
  <p>As I understand it Visual Studio 2010 insists on upgrading all projects, so it's not possible to leave all the solution/project files as 2008 versions.  I really don't want to branch the entire source tree, so I'd like to find a way for multiple versions of the project files coexisting.  Currently, I've duplicated all .sln and .csproj files so I have:</p>
  
  <pre><code># 2008 versions
  SolutionName.sln
  ProjectA.csproj
  ProjectB.csproj
  
  # 2010 versions
  SolutionName.vs2010.sln
  ProjectA.vs2010.csproj
  ProjectB.vs2010.csproj
  </code></pre>
  
  <p>The trouble is, despite the 2010 versioned files all having the same assembly names as their 2008 counterparts, Visual Studio (2010) believes the projects are all <code>ProjectName.vs2010</code>.  Renaming the project in VS fails with a message saying a file of the same name already exists.</p>
  
  <p>I don't think putting the 2010 version in a sub-folder would be a solution as it would screw up any relative paths in the files.</p>
  
  <p>So:</p>
  
  <ul>
  <li>Is there any way to convince VS that the project name should not be suffixed with .vs2010 (i.e. not the same name as the file)?  Or</li>
  <li>Am I approaching this the wrong way?  Is there a better way of working with multiple versions of VS on the same projects?</li>
  </ul>
  
  <p><strong>UPDATE</strong></p>
  
  <p>My initial claim was wrong that Visual Studio was failing to find the project references because it was using the file name.  The specific problem I was having was that in my build files the project references were of the form:</p>
  
  <pre><code>&lt;ProjectReference Include="..\..\path\to\ProjectName.vs2010.csproj"&gt;
      &lt;Project&gt;{48354450-2462-449D-8B32-EFECA39F6CD7}&lt;/Project&gt;
      &lt;Name&gt;ProjectName&lt;/Name&gt;
  &lt;/ProjectReference&gt;
  </code></pre>
  
  <p>The project files that I copied apparently have a different ID (or whatever it is in the <code>&lt;Project&gt;</code> element.  Simply removing the element from the build file has solved that particular issue:</p>
  
  <pre><code>&lt;ProjectReference Include="..\..\path\to\ProjectName.vs2010.csproj"&gt;
      &lt;Name&gt;ProjectName&lt;/Name&gt;
  &lt;/ProjectReference&gt;
  </code></pre>
  
  <p>Having said that, the whole process of duplicating the project and solution files has actually been more effort than it's worth, so I'm not recommending this approach.</p>