<p>I'm working with a large (270+ project) VS.Net solution.  Yes, I know this is pushing the friendship with VS but it's inherited and blah blah.  Anyway, to speed up the solution load and compile time I've removed all projects that I'm not currently working on... which in turn has removed those project references from the projects I want to retain. So now I'm going through a mind numbing process of adding binary references to the retained projects so that the referenced Types can be found.</p>

<p>Here's how I'm working at present;</p>

<ul>
<li>Attempt to compile, get thousands of
errors, 'type or namespace missing'</li>
<li>Copy the first line of the error
list to the clipboard</li>
<li>Using a perl script hooked up to a
hotkey (AHK) I extract the type name from
the error message and store it in the windows clipboard</li>
<li>I paste the type name into source
insight symbol browser and note the
assembly containing the Type</li>
<li>I go back to VS and add that
assembly as a binary reference to
the relevant project</li>
</ul>

<p>So now, after about 30 mins I'm thinking there's just got to be a quicker way...</p>

[{'answer_id': 53984, 'author': 'aku', 'author_id': 1196, 'author_profile': 'https://Stackoverflow.com/users/1196', 'pm_score': 2, 'selected': False, 'text': '<p>These solutions come to my mind:</p>\n\n<ul>\n<li>You can try to use <a href="http://www.dependencywalker.com" rel="nofollow noreferrer">Dependency Walker</a> or similar program to analyze dependecies.</li>\n<li>Parse MSBuild files (*.csproject) to get list of dependencies</li>\n</ul>\n\n<p><strong>EDIT:</strong><br>\nJust found 2 cool tools <a href="http://www.codeplex.com/dependencyvisualizer" rel="nofollow noreferrer">Dependency Visualizer</a> &amp; <a href="http://www.codeplex.com/DependencyFinder" rel="nofollow noreferrer">Dependency Finder</a> on codeplex I think they can help you greatly.</p>\n\n<p><strong>EDIT:</strong><br>\n@edg, I totally misread your question, since you lose references from csproj files you have to use static analysis tool like NDepend or try to analyze dependencies in run time.</p>\n'}, {'answer_id': 54063, 'author': 'Gulzar Nazim', 'author_id': 4337, 'author_profile': 'https://Stackoverflow.com/users/4337', 'pm_score': 1, 'selected': False, 'text': '<p>One thing you can try is opening up the old .csproj file in notepad and replacing the ProjectReference tags with Reference tags. If you can write a parser, feel free to share. :)</p>\n\n<p>Entry in .csproj file if it is a project reference</p>\n\n<pre><code>  &lt;ItemGroup&gt;\n    &lt;ProjectReference Include="..\\WindowsApplication2\\WindowsApplication2.csproj"&gt;\n      &lt;Project&gt;{7CE93073-D1E3-49B0-949E-89C73F3EC282}&lt;/Project&gt;\n      &lt;Name&gt;WindowsApplication2&lt;/Name&gt;\n    &lt;/ProjectReference&gt;\n  &lt;/ItemGroup&gt;\n</code></pre>\n\n<p>Entry in .csproj file if it is an assembly reference</p>\n\n<pre><code>  &lt;ItemGroup&gt;\n    &lt;Reference Include="WindowsApplication2, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"&gt;\n      &lt;SpecificVersion&gt;False&lt;/SpecificVersion&gt;\n      &lt;ExecutableExtension&gt;.dll&lt;/ExecutableExtension&gt;\n      &lt;HintPath&gt;..\\WindowsApplication2\\bin\\Release\\WindowsApplication2.dll&lt;/HintPath&gt;\n    &lt;/Reference&gt;   &lt;/ItemGroup&gt;\n</code></pre>\n'}, {'answer_id': 54550, 'author': 'Peter Ritchie', 'author_id': 5620, 'author_profile': 'https://Stackoverflow.com/users/5620', 'pm_score': 2, 'selected': True, 'text': "<p>No, there currently isn't a built-in quicker way.</p>\n\n<p>I would suggest not modifying the existing solution and create a new solution with new projects that duplicate (e.g. rename and edit) the projects you want to work on.  If you find that the solution with the hundreds of projects is an issue for you then you'll likely just need to work on a subset.  Start with a couple of new projects, add the binary (not project) reference and go from there.</p>\n"}, {'answer_id': 194677, 'author': 'Emperor XLII', 'author_id': 2495, 'author_profile': 'https://Stackoverflow.com/users/2495', 'pm_score': 1, 'selected': False, 'text': "<p>Instead of removing the project files from the solution, you could unload the projects you aren't working on (right-click the project and select <em>Unload Project</em>). As long as the unloaded project has been built once, any other project with a reference to it will be able to find the assembly in the project's output directory and build with it.</p>\n"}]
['https://Stackoverflow.com/questions/53961', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4200/']