1
+ #
2
+ # Copyright (c) Microsoft. All rights reserved.
3
+ # Licensed under the MIT license. See LICENSE file in the project root for full license information.
4
+ #
5
+
1
6
param (
2
7
[ValidateSet (" Debug" , " Release" )]
3
8
[string ]$Configuration = " Debug"
@@ -10,14 +15,11 @@ $script:IsUnix = $PSVersionTable.PSEdition -and $PSVersionTable.PSEdition -eq "C
10
15
$script :TargetFrameworksParam = " /p:TargetFrameworks=\`" $ ( if (! $script :IsUnix ) { " net451;" }) netstandard1.6\`" "
11
16
12
17
if ($PSVersionTable.PSEdition -ne " Core" ) {
13
- Add-Type - Assembly System.IO.Compression.FileSystem - ErrorAction SilentlyContinue
18
+ Add-Type - Assembly System.IO.Compression.FileSystem
14
19
}
15
20
16
21
task SetupDotNet - Before Restore, Clean , Build, BuildHost, Test, TestPowerShellApi, PackageNuGet {
17
22
18
- # Bail out early if we've already found the exe path
19
- if ($script :dotnetExe -ne $null ) { return }
20
-
21
23
# Fetch the SDK version from global.json
22
24
$globalJson = Get-Content $PSScriptRoot / global.json | ConvertFrom-Json
23
25
$requiredSdkVersion = $globalJson.sdk.version
@@ -93,12 +95,12 @@ task Restore {
93
95
94
96
task Clean {
95
97
exec { & $script :dotnetExe clean }
98
+ Remove-Item .\module\PowerShellEditorServices\bin - Recurse - Force - ErrorAction Ignore
96
99
Get-ChildItem - Recurse src\* .nupkg | Remove-Item - Force - ErrorAction Ignore
97
- Get-ChildItem module\* .zip | Remove-Item - Force - ErrorAction Ignore
100
+ Get-ChildItem .\ module\PowerShellEditorServices \* .zip | Remove-Item - Force - ErrorAction Ignore
98
101
}
99
102
100
103
task GetProductVersion - Before PackageNuGet, PackageModule, UploadArtifacts {
101
- if ($script :BaseVersion ) { return }
102
104
[xml ]$props = Get-Content .\PowerShellEditorServices.Common.props
103
105
104
106
$script :VersionSuffix = $props.Project.PropertyGroup.VersionSuffix
0 commit comments