Skip to content

Commit 5d818d1

Browse files
bergmeisterJamesWTruher
authored andcommitted
remove unneeded restore tasks because .net core 2 does it automatically (#899)
1 parent 22c062c commit 5d818d1

File tree

2 files changed

+0
-40
lines changed

2 files changed

+0
-40
lines changed

.build.ps1

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,6 @@ function Get-BuildTaskParams($project) {
7878
$taskParams
7979
}
8080

81-
function Get-RestoreTaskParams($project) {
82-
@{
83-
Inputs = "$BuildRoot/$project/$project.csproj"
84-
Outputs = "$BuildRoot/$project/$project.csproj"
85-
Jobs = {dotnet restore}
86-
}
87-
}
88-
8981
function Get-CleanTaskParams($project) {
9082
@{
9183
Jobs = {
@@ -122,13 +114,11 @@ popd
122114
$projects = @("engine", "rules")
123115
$projects | ForEach-Object {
124116
Add-ProjectTask $_ build (Get-BuildTaskParams $_)
125-
Add-ProjectTask $_ restore (Get-RestoreTaskParams $_)
126117
Add-ProjectTask $_ clean (Get-CleanTaskParams $_)
127118
Add-ProjectTask $_ test (Get-TestTaskParam $_) "$BuildRoot/tests"
128119
}
129120

130121
task build "engine/build", "rules/build"
131-
task restore "engine/restore", "rules/restore"
132122
task clean "engine/clean", "rules/clean"
133123
task test "engine/test", "rules/test"
134124

buildCoreClr.ps1

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
param(
2-
# Automatically performs a 'dotnet restore' when being run the first time
32
[switch]$Build,
4-
# Restore Projects in case NuGet packages have changed
5-
[switch]$Restore,
63
[switch]$Uninstall,
74
[switch]$Install,
85

@@ -18,19 +15,6 @@ if ($Configuration -match "PSv3" -and $Framework -eq "netstandard1.6")
1815
throw ("{0} configuration is not applicable to {1} framework" -f $Configuration,$Framework)
1916
}
2017

21-
Function Test-DotNetRestore
22-
{
23-
param(
24-
[string] $projectPath
25-
)
26-
Test-Path ([System.IO.Path]::Combine($projectPath, 'obj', 'project.assets.json'))
27-
}
28-
29-
function Invoke-RestoreSolution
30-
{
31-
dotnet restore (Join-Path $PSScriptRoot .\PSScriptAnalyzer.sln)
32-
}
33-
3418
Write-Progress "Building ScriptAnalyzer"
3519
$solutionDir = Split-Path $MyInvocation.InvocationName
3620
if (-not (Test-Path "$solutionDir/global.json"))
@@ -56,28 +40,14 @@ elseif ($Configuration -match 'PSv3') {
5640
$destinationDirBinaries = "$destinationDir\PSv3"
5741
}
5842

59-
if ($Restore.IsPresent)
60-
{
61-
Invoke-RestoreSolution
62-
}
63-
6443
if ($build)
6544
{
6645

6746
Write-Progress "Building Engine"
68-
if (-not (Test-DotNetRestore((Join-Path $solutionDir Engine))))
69-
{
70-
Invoke-RestoreSolution
71-
}
7247
Push-Location Engine\
7348
dotnet build Engine.csproj --framework $Framework --configuration $Configuration
7449
Pop-Location
7550

76-
77-
if (-not (Test-DotNetRestore((Join-Path $solutionDir Rules))))
78-
{
79-
Invoke-RestoreSolution
80-
}
8151
Write-Progress "Building for framework $Framework, configuration $Configuration"
8252
Push-Location Rules\
8353
dotnet build Rules.csproj --framework $Framework --configuration $Configuration

0 commit comments

Comments
 (0)