Skip to content

Commit

Permalink
Fixed issues with resolve relative path to solution
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfowl committed Jun 5, 2011
1 parent ff8cdd3 commit 8dd3f30
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion MSBuild.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ function Add-SolutionDirProperty {
$buildProject = $_ | Get-MSBuildProject

if(!($buildProject.Xml.Properties | ?{ $_.Name -eq 'SolutionDir' })) {
$relativeSolutionPath = [NuGet.PathUtility]::EnsureTrailingSlash([NuGet.PathUtility]::GetRelativePath($_.FullName, (Get-SolutionDir)))
# Get the relative path to the solution
$relativeSolutionPath = [NuGet.PathUtility]::GetRelativePath($_.FullName, $dte.Solution.Properties.Item("Path").Value)
$relativeSolutionPath = [IO.Path]::GetDirectoryName($relativeSolutionPath)
$relativeSolutionPath = [NuGet.PathUtility]::EnsureTrailingSlash($relativeSolutionPath)

$solutionDirProperty = $buildProject.Xml.AddProperty("SolutionDir", $relativeSolutionPath)
$solutionDirProperty.Condition = '$(SolutionDir) == '''' Or $(SolutionDir) == ''*Undefined*'''
$_.Save()
Expand Down
2 changes: 1 addition & 1 deletion NuGetPowerTools.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package>
<metadata>
<id>NuGetPowerTools</id>
<version>0.25</version>
<version>0.26</version>
<authors>David Fowler</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Powershell goodies that make working with nuget even easier!</description>
Expand Down

0 comments on commit 8dd3f30

Please sign in to comment.