Skip to content

Commit 9c4aff9

Browse files
committed
build: Do not restore nugets explicitly
Will be restored when building solution anyway.
1 parent 3684035 commit 9c4aff9

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

Build/build-functions.psm1

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@ if ($msbuild) {
99
$msbuild = join-path $msbuild 'MSBuild\15.0\Bin\MSBuild.exe'
1010
}
1111

12-
function Start-NugetRestore {
13-
write-host -foreground blue "Restore nugets...`n"
14-
dotnet restore "$root\UnitsNet.sln"
15-
16-
# This project type is not supported by dotnet CLI yet
17-
& $nuget restore "$root\UnitsNet.WindowsRuntimeComponent.sln"
18-
write-host -foreground blue "Restore nugets...END`n"
19-
}
20-
2112
function Remove-ArtifactsDir {
2213
write-host -foreground blue "Clean up...`n"
2314
rm $artifactsDir -Recurse -ErrorAction Ignore
@@ -47,7 +38,9 @@ function Start-Build([boolean] $skipUWP = $false) {
4738
else
4839
{
4940
# dontnet CLI does not support WindowsRuntimeComponent project type yet
41+
# msbuild does not auto-restore nugets for this project type
5042
write-host -foreground yellow "WindowsRuntimeComponent project not yet supported by dotnet CLI, using MSBuild15 instead"
43+
& "$msbuild" "$root\UnitsNet.WindowsRuntimeComponent.sln" /verbosity:minimal /p:Configuration=Release /t:restore
5144
& "$msbuild" "$root\UnitsNet.WindowsRuntimeComponent.sln" /verbosity:minimal /p:Configuration=Release
5245
if ($lastexitcode -ne 0) { exit 1 }
5346
}

Build/build.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import-module $PSScriptRoot\build-functions.psm1
2828

2929
try {
3030
Remove-ArtifactsDir
31-
Start-NugetRestore
3231
Update-GeneratedCode
3332
Start-Build $skipUWP
3433
Start-Tests

0 commit comments

Comments
 (0)