Skip to content

Commit b1b9795

Browse files
github-actions[bot]stevejgordonMpdreamz
authored
[Backport 7.x] Update locked mode settings (#5387)
Co-authored-by: Martijn Laarman <[email protected]> Co-authored-by: Steve Gordon <[email protected]> Co-authored-by: Martijn Laarman <[email protected]>
1 parent 29ea0dd commit b1b9795

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

Directory.Build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
<OutputPath Condition="'$(OutputPathBaseDir)' != ''">$(OutputPathBaseDir)\$(MSBuildProjectName)\</OutputPath>
3434
<SolutionRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.bat))</SolutionRoot>
3535

36+
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
37+
<RestoreLockedMode>true</RestoreLockedMode>
3638
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
3739

3840
<DefineConstants Condition="'$(TargetFramework)'=='net461' or '$(TargetFramework)'=='net472'">$(DefineConstants);FULLFRAMEWORK</DefineConstants>

build/scripts/Building.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ open System.IO.Compression
1919

2020
module Build =
2121

22-
let Restore() = DotNet.Exec ["restore"; Paths.Solution; ] |> ignore
22+
let Restore () = DotNet.Exec ["restore"; Paths.Solution; ] |> ignore
2323

2424
let Compile _ version =
2525
let props =

build/scripts/Targets.fs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ module Main =
6363
conditional "clean" parsed.ReleaseBuild <| fun _ -> Build.Clean parsed
6464
target "version" <| fun _ -> printfn "Artifacts Version: %O" artifactsVersion
6565

66-
target "restore" Build.Restore
67-
66+
target "restore" Build.Restore
6867
target "full-build" <| fun _ -> Build.Compile parsed artifactsVersion
6968

7069
//TEST
@@ -95,8 +94,8 @@ module Main =
9594
Fake.IO.Shell.cp_r Paths.BuildOutput path
9695
printfn "Finished Release Build %O, output copied to: %s" artifactsVersion path
9796

98-
conditional "test-nuget-package" (not parsed.SkipTests) <| fun _ -> Tests.RunReleaseUnitTests artifactsVersion parsed
99-
97+
conditional "test-nuget-package" (not parsed.SkipTests) <| fun _ -> Tests.RunReleaseUnitTests artifactsVersion parsed
98+
10099
//CANARY
101100
command "canary" canaryChain <| fun _ -> printfn "Finished Release Build %O" artifactsVersion
102101

build/scripts/Testing.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ module Tests =
7070
//package and not one from cache...y
7171
Environment.setEnvironVar "TestPackageVersion" (version.Full.ToString())
7272
Tooling.DotNet.ExecIn "tests/Tests" ["clean";] |> ignore
73-
Tooling.DotNet.ExecIn "tests/Tests" ["restore";] |> ignore
73+
// needs forced eval because it picks up local nuget packages not part of package.lock.json
74+
Tooling.DotNet.ExecIn "tests/Tests" ["restore"; "--force-evaluate"] |> ignore
7475
dotnetTest "tests/Tests/Tests.csproj" args
7576

7677
let RunUnitTests args =

0 commit comments

Comments
 (0)