IT:AD:NuGet:HowTo/Nest Solutions and still work
Summary
My original notes are listed below – but since then also came across this good article:
Notes
Nuget modifies *.csproj files, adding:
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" />
At the end.
But note that it is solution based.
The first thing that needs doing is search/replacing it with a path that is relative to the Project, not the Solution:
<Import Project="$(ProjectDir)\..\..\.nuget\NuGet.targets" />
Also have to edit the .nuget.targets file from:
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
<NuGetExePath>$(NuGetToolsPath)\nuget.exe</NuGetExePath>
<PackagesConfig>$(ProjectDir)packages.config</PackagesConfig>
<PackagesDir>$(SolutionDir)packages</PackagesDir>
to
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
<NuGetToolsPath>$(ProjectDir)..\..\.nuget</NuGetToolsPath>
<NuGetExePath>$(NuGetToolsPath)\nuget.exe</NuGetExePath>
<PackagesConfig>$(ProjectDir)packages.config</PackagesConfig>
<PackagesDir>$(ProjectDir)..\..\packages</PackagesDir>