Skip to content

Commit 2fa89d4

Browse files
author
Kapil Borle
committed
Set framework and configuration for CoreCLR build
1 parent caffb97 commit 2fa89d4

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

buildCoreClr.ps1

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010
[string]$Configuration = "Debug"
1111
)
1212

13+
Function Test-DotNetRestore
14+
{
15+
param(
16+
[string] $projectPath
17+
)
18+
Test-Path (Join-Path $projectPath 'project.lock.json')
19+
}
20+
1321
$solutionDir = Split-Path $MyInvocation.InvocationName
1422
if (-not (Test-Path "$solutionDir/global.json"))
1523
{
@@ -33,14 +41,24 @@ if ($Framework -eq "netstandard1.6")
3341

3442
if ($build)
3543
{
44+
45+
if (-not (Test-DotNetRestore((Join-Path $solutionDir Engine))))
46+
{
47+
throw "Please restore project Engine"
48+
}
3649
.\New-StronglyTypedCsFileForResx.ps1 Engine
3750
Push-Location Engine\
38-
dotnet build
51+
dotnet build --framework $Framework --configuration $Configuration
3952
Pop-Location
4053

54+
55+
if (-not (Test-DotNetRestore((Join-Path $solutionDir Rules))))
56+
{
57+
throw "Please restore project Rules"
58+
}
4159
.\New-StronglyTypedCsFileForResx.ps1 Rules
4260
Push-Location Rules\
43-
dotnet build
61+
dotnet build --framework $Framework --configuration $Configuration
4462
Pop-Location
4563

4664
Function CopyToDestinationDir($itemsToCopy, $destination)

0 commit comments

Comments
 (0)