Skip to content

Commit

Permalink
(cake-buildGH-129) When using .NET Global tool, resolve Cake.dll to n…
Browse files Browse the repository at this point in the history
…etcoreapp3.1

Bakery currently needs Cake.Core and Cake.Common targeting netstandard2.0 only
cake-build#129 (comment)
  • Loading branch information
augustoproiete committed Mar 7, 2021
1 parent 45f37b1 commit 9cf5942
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Cake.Scripting/CodeGen/CakeScriptGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ private DirectoryPath GetCakePath(DirectoryPath toolPath)
.FirstOrDefault(x => _fileSystem.Exist(x))?.GetDirectory();
if (dotnetCakePath != null)
{
pattern = string.Concat(dotnetCakePath.FullPath, "/.store/**/Cake.dll");
var cakeDllPath = _globber.GetFiles(pattern).FirstOrDefault();
pattern = string.Concat(dotnetCakePath.FullPath, "/.store/**/^{netcoreapp3.1,netcoreapp2.1}/**/Cake.dll");
var cakeDllPath = _globber.GetFiles(pattern).LastOrDefault();

if (cakeDllPath != null)
{
Expand Down

0 comments on commit 9cf5942

Please sign in to comment.