-
Notifications
You must be signed in to change notification settings - Fork 70
Guide
This guide shows how this extension is meant to be used.
Open a solution which contains projects with installed NuGet packages. It's not required that the NuGet library projects are added to the solution.
Open the Tools menu and select Switch NuGet and Project references:
In the opened dialog you will see a list of all DLLs which are coming from installed NuGet packages:
Select a project file (.csproj) for each NuGet DLL you want to replace with a project reference:
Now click on Switch to Project references and the extension automatically updates your solution and projects. Additionally, it stores a file alongside each changed project to restore to the initially referenced NuGet DLLs. This file is called MyProjectName.nugetreferenceswitcher and should not be deleted, otherwise you cannot automatically revert to NuGet DLL references later.
Now you can develop your application as if NuGet is not used for the switched library projects.
After development and before committing to the VCS, switch back to the original NuGet DLL references. To do so, open the Tools menu and select Switch NuGet and Project references again. Switch to the second tab and you should see the list of switches you have done previously. Now, click on the button Switch to NuGet references and the extension restores all NuGet DLL references and removes the projects from the solution if you selected this option.
After restoring the references, the solution most probably does not compile because the project references the original, old NuGet DLLs. You have to create new NuGet packages based on the changes in the NuGet library projects and update the projects which reference these NuGet packages. After doing that, the solution should compile again...
Tip: If you have lots of projects, you can use the Project Dependency Browser application to find projects which depend on a given NuGet package.