Closed dsplaisted closed 8 years ago
Pull requests welcome ;)
Seriously though, what do you think are the best options -- you prob know MSBuild better than I do.... the only catch is that a full path is required, though ....\ should be ok.
I would use $(MSBuildProjectDirectory)\..\
if the SolutionDir
isn't defined. I don't think it needs to be a full path, but if it does need to be you can call Path.GetFullPath
using this syntax:
$([System.IO.Path]::GetFullPath($(MSBuildProjectDirectory)\..\)
How many level's up should I search? And what's the best way? Multiple NuSpecFile conditional on the previous one being blank?
It is just a default/convention; it can always be directly specified.
Since it's just the default, I would go with just one level up until someone else complains :-)
fixed in 1.3.2
The targets file uses SolutionDir as the root to find the NuSpec files if there's nothing in the
NuSpecFile
ItemGroup. In the MSBuild and CoreFx repos (and maybe others), we don't use a solution file for our command-line build, so this property isn't set.If the
SolutionDir
property isn't set, it would be nice if the targets file would do something like just use the project folder or one level up from it.