Skip to content

Commit b2a9be1

Browse files
committed
Check proj for restore
1 parent 3a64206 commit b2a9be1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/Paket.Core/Common/Utils.fs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,8 +543,14 @@ let RunInLockedAccessMode(lockedFolder,lockedAction: unit -> bool) =
543543
if runDotNetRestore then
544544
let slnFiles = rootFolder.GetFiles("*.sln", SearchOption.TopDirectoryOnly)
545545
if Array.isEmpty slnFiles then
546-
tracefn "Calling dotnet restore"
547-
runDotnet rootFolder.FullName "restore"
546+
let projFiles = rootFolder.GetFiles("*.*proj", SearchOption.TopDirectoryOnly)
547+
if Array.isEmpty projFiles then
548+
tracefn "Calling dotnet restore"
549+
runDotnet rootFolder.FullName "restore"
550+
else
551+
for sln in projFiles do
552+
tracefn "Calling dotnet restore on %s" sln.Name
553+
runDotnet rootFolder.FullName (sprintf "restore \"%s\"" sln.Name)
548554
else
549555
for sln in slnFiles do
550556
tracefn "Calling dotnet restore on %s" sln.Name

0 commit comments

Comments
 (0)