forked from davidfowl/NuGetPowerTools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVS.psm1
More file actions
28 lines (26 loc) · 629 Bytes
/
Copy pathVS.psm1
File metadata and controls
28 lines (26 loc) · 629 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function Get-SolutionDir {
if($dte.Solution -and $dte.Solution.IsOpen) {
return Split-Path $dte.Solution.Properties.Item("Path").Value
}
else {
throw "Solution not avaliable"
}
}
function Get-ProjectPropertyValue {
param(
[parameter(Mandatory = $true)]
[string]$ProjectName,
[parameter(Mandatory = $true)]
[string]$PropertyName
)
try {
$property = (Get-Project $ProjectName).Properties.Item($PropertyName)
if($property) {
return $property.Value
}
}
catch {
}
return $null
}
Export-ModuleMember *