$(SolutionDir) & Multi-Solution Project Files

Topics: General
Aug 5, 2014 at 6:34 PM
I have a project that is being included in multiple solutions (one for customers, one internal master solution). When NuGet updates the .csproj after installing a package it uses a relative path to get back to the solution dir to locate the packages directory. Is there any reason why NuGet does not use $(SolutionDir) instead?

For example I'd like to see the following NuGet reference use $(SolutionDir) instead of ..\Solution\ so the project can be included in multiple solution files.

=> $(SolutionDir)packages\Xamarin.Automation.\lib\net45\Xamarin.Automation.dll
Aug 11, 2014 at 10:00 PM
+1 it should use $(SolutionDir) or have an ability to use a custom MSBuild variable (also preserve it when updating packages). Right now even if we manually use $(SolutionDir) when we update the package it rewrites to ...... again.