I had some problems with my solution\'s references since somebody went and messed up NuGet... restoring from source control rendered the projects unloadable, and I had to play a
It is not simple but try following steps:
Explanation:
When nuget add reference it add it in csproj like below:
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.4.5.9\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
Which means that package number is in HintPath. After you merge two branches, the nuget version numbers probably changed. This causes that HintPath should also be changed to proper path with version. That is why Visual Studio has problems to find them.
In Visual Studio 2017 for Asp.Net Core project it was enough to unload and then reload .csproj file
(VisualStudio 2017). None of the suggestions here worked... --until I completely closed out of VisualStudio and restarted it. It took a couple seconds longer than usual, but all the dependencies were restored thereafter!
In your Visual Studio Solution folder, open the 'packages' folder and delete everything which is inside that folder. Then restore nuget packages.