-
Notifications
You must be signed in to change notification settings - Fork 0
/
NetCore.psm1
44 lines (41 loc) · 1019 Bytes
/
NetCore.psm1
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
function New-NetCoreSolution {
[CmdletBinding()]
param (
[Parameter(Mandatory, ValueFromPipeline)]
[string[]] $Name
)
process {
$Name |
ForEach-Object {
dotnet new sln --name $_ | Write-Host -ForegroundColor Magenta
}
}
}
function New-NetCoreProject {
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[string] $Name,
[Parameter()]
[string] $TemplateName = 'classlib'
)
process {
dotnet new $TemplateName --name $Name | Write-Host -ForegroundColor Magenta
Get-Item ".\\$Name\\$Name.csproj"
}
}
function Add-NetCoreProjectsToSolution {
[CmdletBinding()]
param (
[Parameter(ValueFromPipeline)]
[string[]] $ProjectFile = (Get-ChildItem -r -inc *.csproj),
[Parameter(Mandatory)]
[string] $SolutionFile
)
process {
$ProjectFile |
ForEach-Object {
dotnet sln add $_
}
}
}