cake-build / cake

:cake: Cake (C# Make) is a cross platform build automation system.
https://cakebuild.net
MIT License
3.92k stars 731 forks source link

Cake 4.0.0 not respecting .NET global.json version pinning when calling referenced tool #4288

Open IlIlIllIllI opened 10 months ago

IlIlIllIllI commented 10 months ago

Prerequisites

Cake runner

Cake .NET Tool

Cake version

4.0.0

Operating system

Windows

Operating system architecture

64-Bit

CI Server

No response

What are you seeing?

Cake is calling .NET 8 version of a referenced tool (ReportGenerator v5.2.0) when it should be using the pinned version of .NET in our global.json file.

What is expected?

Cake should run the GenereateReport task successfully, and report should be generated (depending on the coverage files provided in the coverage folder).

Steps to Reproduce

Prereqs:

Setup:

.config/dotnet-tools.json

{
    "version": 1,
    "isRoot": true,
    "tools": {
        "cake.tool": {
            "version": "4.0.0",
            "commands": [
                "dotnet-cake"
            ]
        }
    }
}

build.cake

#tool nuget:?package=ReportGenerator&version=5.2.0

const string COVERAGE_FOLDER = "coverage";
const string REPORT_FOLDER = "report";
const string DEFAULT_TARGET = "Default";
const string GENERATE_REPORT_TARGET = "GenerateReport";
static readonly string _allCoverageFilesGlob = $"{COVERAGE_FOLDER}/**/*.xml";

string _target = Argument("target", DEFAULT_TARGET);

Task(GENERATE_REPORT_TARGET)
.Does(() =>
{
    var coverageFiles = GetFiles(_allCoverageFilesGlob);

    foreach(FilePath coverageFile in coverageFiles)
    {
        ReportGenerator(coverageFile, $"{COVERAGE_FOLDER}/{REPORT_FOLDER}/test");
    }
});

Task(DEFAULT_TARGET)
    .IsDependentOn(GENERATE_REPORT_TARGET);

RunTarget(_target);

build.ps1

$ErrorActionPreference = 'Stop'

Set-Location -LiteralPath $PSScriptRoot

$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = '1'
$env:DOTNET_CLI_TELEMETRY_OPTOUT = '1'
$env:DOTNET_NOLOGO = '1'

dotnet tool restore
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }

dotnet cake @args
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }

global.json

{
    "sdk": {
        "version": "6.0.0",
        "rollForward": "latestMinor"
    }
}

Execute: .\build.ps1 --target=GenerateReport --verbosity=diagnostic

Output log

> .\build.ps1 --target=GenerateReport --verbosity=Diagnostic
Tool 'cake.tool' (version '4.0.0') was restored. Available commands: dotnet-cake

Restore was successful.
Looking for modules...
No modules found to install.
Module directory does not exist.
Analyzing build script...
Analyzing build.cake...
Processing build script...
Installing tools...
Adding assembly reference to System.Private.CoreLib.dll...
Adding assembly reference to System.Linq.Expressions.dll...
Adding assembly reference to Microsoft.CSharp.dll...
Adding assembly reference to System.Runtime.dll...
Adding assembly reference to System.Runtime.InteropServices.dll...
Adding assembly reference to System.Collections.dll...
Adding assembly reference to System.Threading.dll...
Adding assembly reference to System.Memory.dll...
Adding assembly reference to System.Runtime.CompilerServices.Unsafe.dll...
Adding assembly reference to System.Collections.Concurrent.dll...
Adding assembly reference to System.Linq.dll...
Adding assembly reference to System.Reflection.Emit.dll...
Adding assembly reference to Microsoft.VisualBasic.Core.dll...
Adding assembly reference to System.Reflection.Emit.Lightweight.dll...
Adding assembly reference to System.Reflection.Emit.ILGeneration.dll...
Adding assembly reference to System.Reflection.Primitives.dll...
Adding assembly reference to System.ObjectModel.dll...
Adding assembly reference to System.Threading.Thread.dll...
Adding assembly reference to System.IO.FileSystem.DriveInfo.dll...
Adding assembly reference to System.Collections.Specialized.dll...
Adding assembly reference to System.Diagnostics.Process.dll...
Adding assembly reference to Microsoft.Win32.Primitives.dll...
Adding assembly reference to System.ComponentModel.Primitives.dll...
Adding assembly reference to System.Text.RegularExpressions.dll...
Adding assembly reference to System.Collections.NonGeneric.dll...
Adding assembly reference to Microsoft.Win32.Registry.dll...
Adding assembly reference to Microsoft.VisualBasic.dll...
Adding assembly reference to System.Security.AccessControl.dll...
Adding assembly reference to System.Security.Principal.Windows.dll...
Adding assembly reference to mscorlib.dll...
Adding assembly reference to netstandard.dll...
Adding assembly reference to System.IO.MemoryMappedFiles.dll...
Adding assembly reference to System.IO.Pipes.dll...
Adding assembly reference to System.Security.Cryptography.X509Certificates.dll...
Adding assembly reference to System.ComponentModel.TypeConverter.dll...
Adding assembly reference to System.ComponentModel.EventBasedAsync.dll...
Adding assembly reference to System.ComponentModel.dll...
Adding assembly reference to System.Console.dll...
Adding assembly reference to System.Data.Common.dll...
Adding assembly reference to System.Diagnostics.TraceSource.dll...
Adding assembly reference to System.Diagnostics.Contracts.dll...
Adding assembly reference to System.Diagnostics.TextWriterTraceListener.dll...
Adding assembly reference to System.Diagnostics.FileVersionInfo.dll...
Adding assembly reference to System.Diagnostics.StackTrace.dll...
Adding assembly reference to System.Diagnostics.Tracing.dll...
Adding assembly reference to System.Drawing.Primitives.dll...
Adding assembly reference to System.IO.Compression.Brotli.dll...
Adding assembly reference to System.IO.Compression.dll...
Adding assembly reference to System.IO.Compression.ZipFile.dll...
Adding assembly reference to System.IO.FileSystem.Watcher.dll...
Adding assembly reference to System.IO.IsolatedStorage.dll...
Adding assembly reference to System.Linq.Queryable.dll...
Adding assembly reference to System.Linq.Parallel.dll...
Adding assembly reference to System.Net.Requests.dll...
Adding assembly reference to System.Net.Primitives.dll...
Adding assembly reference to System.Net.HttpListener.dll...
Adding assembly reference to System.Net.ServicePoint.dll...
Adding assembly reference to System.Net.NameResolution.dll...
Adding assembly reference to System.Net.WebClient.dll...
Adding assembly reference to System.Net.Http.dll...
Adding assembly reference to System.Net.WebHeaderCollection.dll...
Adding assembly reference to System.Net.WebProxy.dll...
Adding assembly reference to System.Net.Mail.dll...
Adding assembly reference to System.Net.NetworkInformation.dll...
Adding assembly reference to System.Net.Ping.dll...
Adding assembly reference to System.Net.Security.dll...
Adding assembly reference to System.Net.Sockets.dll...
Adding assembly reference to System.Net.WebSockets.Client.dll...
Adding assembly reference to System.Net.WebSockets.dll...
Adding assembly reference to System.Runtime.Numerics.dll...
Adding assembly reference to System.Numerics.Vectors.dll...
Adding assembly reference to System.Reflection.DispatchProxy.dll...
Adding assembly reference to System.Resources.Writer.dll...
Adding assembly reference to System.Runtime.CompilerServices.VisualC.dll...
Adding assembly reference to System.Runtime.InteropServices.RuntimeInformation.dll...
Adding assembly reference to System.Runtime.Serialization.Primitives.dll...
Adding assembly reference to System.Runtime.Serialization.Xml.dll...
Adding assembly reference to System.Runtime.Serialization.Json.dll...
Adding assembly reference to System.Runtime.Serialization.Formatters.dll...
Adding assembly reference to System.Security.Claims.dll...
Adding assembly reference to System.Security.Cryptography.Algorithms.dll...
Adding assembly reference to System.Security.Cryptography.Csp.dll...
Adding assembly reference to System.Security.Cryptography.Encoding.dll...
Adding assembly reference to System.Security.Cryptography.Primitives.dll...
Adding assembly reference to System.Text.Encoding.Extensions.dll...
Adding assembly reference to System.Threading.Overlapped.dll...
Adding assembly reference to System.Threading.ThreadPool.dll...
Adding assembly reference to System.Threading.Tasks.Parallel.dll...
Adding assembly reference to System.Transactions.Local.dll...
Adding assembly reference to System.Web.HttpUtility.dll...
Adding assembly reference to System.Xml.ReaderWriter.dll...
Adding assembly reference to System.Xml.XDocument.dll...
Adding assembly reference to System.Xml.XmlSerializer.dll...
Adding assembly reference to System.Xml.XPath.XDocument.dll...
Adding assembly reference to System.Xml.XPath.dll...
Adding assembly reference to System.AppContext.dll...
Adding assembly reference to System.Buffers.dll...
Adding assembly reference to System.Collections.Immutable.dll...
Adding assembly reference to System.ComponentModel.Annotations.dll...
Adding assembly reference to System.ComponentModel.DataAnnotations.dll...
Adding assembly reference to System.Runtime.Loader.dll...
Adding assembly reference to System.Configuration.dll...
Adding assembly reference to System.Core.dll...
Adding assembly reference to System.Private.Uri.dll...
Adding assembly reference to System.Data.DataSetExtensions.dll...
Adding assembly reference to System.Data.dll...
Adding assembly reference to System.Diagnostics.Debug.dll...
Adding assembly reference to System.Diagnostics.DiagnosticSource.dll...
Adding assembly reference to System.Reflection.Metadata.dll...
Adding assembly reference to System.Diagnostics.Tools.dll...
Adding assembly reference to System.dll...
Adding assembly reference to System.Drawing.dll...
Adding assembly reference to System.Dynamic.Runtime.dll...
Adding assembly reference to System.Formats.Asn1.dll...
Adding assembly reference to System.Globalization.Calendars.dll...
Adding assembly reference to System.Globalization.dll...
Adding assembly reference to System.Globalization.Extensions.dll...
Adding assembly reference to System.IO.Compression.FileSystem.dll...
Adding assembly reference to System.IO.dll...
Adding assembly reference to System.IO.FileSystem.AccessControl.dll...
Adding assembly reference to System.IO.FileSystem.dll...
Adding assembly reference to System.IO.FileSystem.Primitives.dll...
Adding assembly reference to System.IO.Pipes.AccessControl.dll...
Adding assembly reference to System.IO.UnmanagedMemoryStream.dll...
Adding assembly reference to System.Net.dll...
Adding assembly reference to System.Net.Quic.dll...
Adding assembly reference to System.Threading.Channels.dll...
Adding assembly reference to System.Net.Http.Json.dll...
Adding assembly reference to System.Text.Json.dll...
Adding assembly reference to System.Numerics.dll...
Adding assembly reference to System.Reflection.dll...
Adding assembly reference to System.Reflection.Extensions.dll...
Adding assembly reference to System.Reflection.TypeExtensions.dll...
Adding assembly reference to System.Resources.Reader.dll...
Adding assembly reference to System.Resources.ResourceManager.dll...
Adding assembly reference to System.Runtime.Extensions.dll...
Adding assembly reference to System.Runtime.Handles.dll...
Adding assembly reference to System.Runtime.Intrinsics.dll...
Adding assembly reference to System.Runtime.Serialization.dll...
Adding assembly reference to System.Private.DataContractSerialization.dll...
Adding assembly reference to System.Security.Cryptography.Cng.dll...
Adding assembly reference to System.Security.Cryptography.OpenSsl.dll...
Adding assembly reference to System.Security.dll...
Adding assembly reference to System.Security.Principal.dll...
Adding assembly reference to System.Security.SecureString.dll...
Adding assembly reference to System.ServiceModel.Web.dll...
Adding assembly reference to System.ServiceProcess.dll...
Adding assembly reference to System.Text.Encoding.CodePages.dll...
Adding assembly reference to System.Text.Encoding.dll...
Adding assembly reference to System.Text.Encodings.Web.dll...
Adding assembly reference to System.Threading.Tasks.Dataflow.dll...
Adding assembly reference to System.Threading.Tasks.dll...
Adding assembly reference to System.Threading.Tasks.Extensions.dll...
Adding assembly reference to System.Threading.Timer.dll...
Adding assembly reference to System.Transactions.dll...
Adding assembly reference to System.ValueTuple.dll...
Adding assembly reference to System.Web.dll...
Adding assembly reference to System.Windows.dll...
Adding assembly reference to System.Xml.dll...
Adding assembly reference to System.Xml.Linq.dll...
Adding assembly reference to System.Private.Xml.dll...
Adding assembly reference to System.Xml.Serialization.dll...
Adding assembly reference to System.Private.Xml.Linq.dll...
Adding assembly reference to System.Xml.XmlDocument.dll...
Adding assembly reference to WindowsBase.dll...
Adding assembly reference to Cake.Core.dll...
Adding assembly reference to Cake.Common.dll...
Adding assembly reference to Spectre.Console.dll...
Importing namespace Cake.Common...
Importing namespace Cake.Common.Build...
Importing namespace Cake.Common.Build.AppVeyor...
Importing namespace Cake.Common.Build.AppVeyor.Data...
Importing namespace Cake.Common.Build.AzurePipelines...
Importing namespace Cake.Common.Build.AzurePipelines.Data...
Importing namespace Cake.Common.Build.Bamboo...
Importing namespace Cake.Common.Build.Bamboo.Data...
Importing namespace Cake.Common.Build.BitbucketPipelines...
Importing namespace Cake.Common.Build.BitbucketPipelines.Data...
Importing namespace Cake.Common.Build.Bitrise...
Importing namespace Cake.Common.Build.Bitrise.Data...
Importing namespace Cake.Common.Build.ContinuaCI...
Importing namespace Cake.Common.Build.ContinuaCI.Data...
Importing namespace Cake.Common.Build.GitHubActions...
Importing namespace Cake.Common.Build.GitHubActions.Data...
Importing namespace Cake.Common.Build.GitLabCI...
Importing namespace Cake.Common.Build.GitLabCI.Data...
Importing namespace Cake.Common.Build.GoCD...
Importing namespace Cake.Common.Build.GoCD.Data...
Importing namespace Cake.Common.Build.Jenkins...
Importing namespace Cake.Common.Build.Jenkins.Data...
Importing namespace Cake.Common.Build.MyGet...
Importing namespace Cake.Common.Build.TeamCity...
Importing namespace Cake.Common.Build.TravisCI...
Importing namespace Cake.Common.Build.TravisCI.Data...
Importing namespace Cake.Common.Diagnostics...
Importing namespace Cake.Common.IO...
Importing namespace Cake.Common.IO.Paths...
Importing namespace Cake.Common.Net...
Importing namespace Cake.Common.Security...
Importing namespace Cake.Common.Solution...
Importing namespace Cake.Common.Solution.Project...
Importing namespace Cake.Common.Solution.Project.Properties...
Importing namespace Cake.Common.Solution.Project.XmlDoc...
Importing namespace Cake.Common.Text...
Importing namespace Cake.Common.Tools.Cake...
Importing namespace Cake.Common.Tools.Chocolatey...
Importing namespace Cake.Common.Tools.Chocolatey.ApiKey...
Importing namespace Cake.Common.Tools.Chocolatey.Config...
Importing namespace Cake.Common.Tools.Chocolatey.Download...
Importing namespace Cake.Common.Tools.Chocolatey.Export...
Importing namespace Cake.Common.Tools.Chocolatey.Features...
Importing namespace Cake.Common.Tools.Chocolatey.Install...
Importing namespace Cake.Common.Tools.Chocolatey.New...
Importing namespace Cake.Common.Tools.Chocolatey.Pack...
Importing namespace Cake.Common.Tools.Chocolatey.Pin...
Importing namespace Cake.Common.Tools.Chocolatey.Push...
Importing namespace Cake.Common.Tools.Chocolatey.Sources...
Importing namespace Cake.Common.Tools.Chocolatey.Uninstall...
Importing namespace Cake.Common.Tools.Chocolatey.Upgrade...
Importing namespace Cake.Common.Tools.Command...
Importing namespace Cake.Common.Tools.DotCover...
Importing namespace Cake.Common.Tools.DotCover.Analyse...
Importing namespace Cake.Common.Tools.DotCover.Cover...
Importing namespace Cake.Common.Tools.DotCover.Merge...
Importing namespace Cake.Common.Tools.DotCover.Report...
Importing namespace Cake.Common.Tools.DotNet...
Importing namespace Cake.Common.Tools.DotNet.Build...
Importing namespace Cake.Common.Tools.DotNet.BuildServer...
Importing namespace Cake.Common.Tools.DotNet.Clean...
Importing namespace Cake.Common.Tools.DotNet.Execute...
Importing namespace Cake.Common.Tools.DotNet.Format...
Importing namespace Cake.Common.Tools.DotNet.MSBuild...
Importing namespace Cake.Common.Tools.DotNet.NuGet.Delete...
Importing namespace Cake.Common.Tools.DotNet.NuGet.Push...
Importing namespace Cake.Common.Tools.DotNet.NuGet.Source...
Importing namespace Cake.Common.Tools.DotNet.Pack...
Importing namespace Cake.Common.Tools.DotNet.Package.Add...
Importing namespace Cake.Common.Tools.DotNet.Package.Remove...
Importing namespace Cake.Common.Tools.DotNet.Publish...
Importing namespace Cake.Common.Tools.DotNet.Restore...
Importing namespace Cake.Common.Tools.DotNet.Run...
Importing namespace Cake.Common.Tools.DotNet.SDKCheck...
Importing namespace Cake.Common.Tools.DotNet.Test...
Importing namespace Cake.Common.Tools.DotNet.Tool...
Importing namespace Cake.Common.Tools.DotNet.VSTest...
Importing namespace Cake.Common.Tools.DotNet.Workload.Install...
Importing namespace Cake.Common.Tools.DotNet.Workload.List...
Importing namespace Cake.Common.Tools.DotNet.Workload.Repair...
Importing namespace Cake.Common.Tools.DotNet.Workload.Restore...
Importing namespace Cake.Common.Tools.DotNet.Workload.Search...
Importing namespace Cake.Common.Tools.DotNet.Workload.Uninstall...
Importing namespace Cake.Common.Tools.DotNet.Workload.Update...
Importing namespace Cake.Common.Tools.DupFinder...
Importing namespace Cake.Common.Tools.Fixie...
Importing namespace Cake.Common.Tools.GitLink...
Importing namespace Cake.Common.Tools.GitReleaseManager...
Importing namespace Cake.Common.Tools.GitReleaseManager.AddAssets...
Importing namespace Cake.Common.Tools.GitReleaseManager.Close...
Importing namespace Cake.Common.Tools.GitReleaseManager.Create...
Importing namespace Cake.Common.Tools.GitReleaseManager.Discard...
Importing namespace Cake.Common.Tools.GitReleaseManager.Export...
Importing namespace Cake.Common.Tools.GitReleaseManager.Label...
Importing namespace Cake.Common.Tools.GitReleaseManager.Open...
Importing namespace Cake.Common.Tools.GitReleaseManager.Publish...
Importing namespace Cake.Common.Tools.GitReleaseNotes...
Importing namespace Cake.Common.Tools.GitVersion...
Importing namespace Cake.Common.Tools.ILMerge...
Importing namespace Cake.Common.Tools.ILRepack...
Importing namespace Cake.Common.Tools.InnoSetup...
Importing namespace Cake.Common.Tools.InspectCode...
Importing namespace Cake.Common.Tools.MSBuild...
Importing namespace Cake.Common.Tools.MSpec...
Importing namespace Cake.Common.Tools.MSTest...
Importing namespace Cake.Common.Tools.NSIS...
Importing namespace Cake.Common.Tools.NuGet...
Importing namespace Cake.Common.Tools.NuGet.Add...
Importing namespace Cake.Common.Tools.NuGet.Delete...
Importing namespace Cake.Common.Tools.NuGet.Init...
Importing namespace Cake.Common.Tools.NuGet.Install...
Importing namespace Cake.Common.Tools.NuGet.List...
Importing namespace Cake.Common.Tools.NuGet.Pack...
Importing namespace Cake.Common.Tools.NuGet.Push...
Importing namespace Cake.Common.Tools.NuGet.Restore...
Importing namespace Cake.Common.Tools.NuGet.SetApiKey...
Importing namespace Cake.Common.Tools.NuGet.SetProxy...
Importing namespace Cake.Common.Tools.NuGet.Sources...
Importing namespace Cake.Common.Tools.NuGet.Update...
Importing namespace Cake.Common.Tools.NUnit...
Importing namespace Cake.Common.Tools.OctopusDeploy...
Importing namespace Cake.Common.Tools.OpenCover...
Importing namespace Cake.Common.Tools.ReportGenerator...
Importing namespace Cake.Common.Tools.ReportUnit...
Importing namespace Cake.Common.Tools.Roundhouse...
Importing namespace Cake.Common.Tools.SignTool...
Importing namespace Cake.Common.Tools.SpecFlow...
Importing namespace Cake.Common.Tools.SpecFlow.StepDefinitionReport...
Importing namespace Cake.Common.Tools.SpecFlow.TestExecutionReport...
Importing namespace Cake.Common.Tools.TextTransform...
Importing namespace Cake.Common.Tools.VSTest...
Importing namespace Cake.Common.Tools.VSWhere...
Importing namespace Cake.Common.Tools.VSWhere.All...
Importing namespace Cake.Common.Tools.VSWhere.Latest...
Importing namespace Cake.Common.Tools.VSWhere.Legacy...
Importing namespace Cake.Common.Tools.VSWhere.Product...
Importing namespace Cake.Common.Tools.WiX...
Importing namespace Cake.Common.Tools.WiX.Heat...
Importing namespace Cake.Common.Tools.XBuild...
Importing namespace Cake.Common.Tools.XUnit...
Importing namespace Cake.Common.Xml...
Importing namespace Cake.Core...
Importing namespace Cake.Core.Diagnostics...
Importing namespace Cake.Core.IO...
Importing namespace Cake.Core.Scripting...
Importing namespace Cake.Core.Tooling...
Importing namespace System...
Importing namespace System.Collections.Generic...
Importing namespace System.IO...
Importing namespace System.Linq...
Importing namespace System.Text...
Importing namespace System.Threading.Tasks...
Compiling build script...

========================================
GenerateReport
========================================
Executing task: GenerateReport
Executing: "C:/devwork/scratch/tools/ReportGenerator.5.2.0/tools/net8.0/ReportGenerator.exe" "-reports:C:/devwork/scratch/coverage/BC.Tests/coverage.cobertura
.xml" "-targetdir:C:/devwork/scratch/coverage/report/test"
You must install or update .NET to run this application.

App: C:\devwork\scratch\tools\ReportGenerator.5.2.0\tools\net8.0\ReportGenerator.exe
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.0' (x64)
.NET location: C:\Program Files\dotnet\

The following frameworks were found:
  2.1.30 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  2.2.7 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  2.2.8 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  3.1.22 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  3.1.23 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  3.1.32 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  5.0.15 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  5.0.17 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  6.0.3 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  6.0.5 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  6.0.15 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  6.0.16 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  6.0.23 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  7.0.5 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  7.0.12 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.0&arch=x64&rid=win10-x64
An error occurred when executing task 'GenerateReport'.
Completed in 00:00:00.0445119
Error: Cake.Core.CakeException: ReportGenerator: Process returned an error (exit code -2147450730).
   at Cake.Core.Tooling.Tool`1.ProcessExitCode(Int32 exitCode) in C:\projects\cake\src\Cake.Core\Tooling\Tool.cs:line 118
   at Cake.Core.Tooling.Tool`1.Run(TSettings settings, ProcessArgumentBuilder arguments, ProcessSettings processSettings, Action`1 postAction) in C:\projects\cake\src\Cak
e.Core\Tooling\Tool.cs:line 103
   at Cake.Core.Tooling.Tool`1.Run(TSettings settings, ProcessArgumentBuilder arguments) in C:\projects\cake\src\Cake.Core\Tooling\Tool.cs:line 60
   at Cake.Common.Tools.ReportGenerator.ReportGeneratorRunner.Run(IEnumerable`1 reports, DirectoryPath targetDir, ReportGeneratorSettings settings) in C:\projects\cake\sr
c\Cake.Common\Tools\ReportGenerator\ReportGeneratorRunner.cs:line 65
   at Cake.Common.Tools.ReportGenerator.ReportGeneratorAliases.ReportGenerator(ICakeContext context, IEnumerable`1 reports, DirectoryPath targetDir, ReportGeneratorSettin
gs settings) in C:\projects\cake\src\Cake.Common\Tools\ReportGenerator\ReportGeneratorAliases.cs:line 150
   at Cake.Common.Tools.ReportGenerator.ReportGeneratorAliases.ReportGenerator(ICakeContext context, FilePath report, DirectoryPath targetDir, ReportGeneratorSettings set
tings) in C:\projects\cake\src\Cake.Common\Tools\ReportGenerator\ReportGeneratorAliases.cs:line 107
   at Cake.Common.Tools.ReportGenerator.ReportGeneratorAliases.ReportGenerator(ICakeContext context, FilePath report, DirectoryPath targetDir) in C:\projects\cake\src\Cak
e.Common\Tools\ReportGenerator\ReportGeneratorAliases.cs:line 87
   at Submission#0.ReportGenerator(FilePath report, DirectoryPath targetDir)
   at Submission#0.<<Initialize>>b__0_0()
   at Cake.Core.CakeTaskBuilderExtensions.<>c__DisplayClass36_0.<Does>b__0(ICakeContext _) in C:\projects\cake\src\Cake.Core\CakeTaskBuilder.Execution.cs:line 26
   at Cake.Core.CakeTaskBuilderExtensions.<>c__DisplayClass39_0.<Does>b__0(ICakeContext context) in C:\projects\cake\src\Cake.Core\CakeTaskBuilder.Execution.cs:line 81
   at Cake.Core.CakeTask.Execute(ICakeContext context) in C:\projects\cake\src\Cake.Core\CakeTask.cs:line 119
   at Cake.Core.DefaultExecutionStrategy.ExecuteAsync(CakeTask task, ICakeContext context) in C:\projects\cake\src\Cake.Core\DefaultExecutionStrategy.cs:line 69
   at Cake.Core.CakeEngine.ExecuteTaskAsync(ICakeContext context, IExecutionStrategy strategy, Stopwatch stopWatch, CakeTask task, CakeReport report) in C:\projects\cake\
src\Cake.Core\CakeEngine.cs:line 318
   at Cake.Core.CakeEngine.ExecuteTaskAsync(ICakeContext context, IExecutionStrategy strategy, Stopwatch stopWatch, CakeTask task, CakeReport report) in C:\projects\cake\
src\Cake.Core\CakeEngine.cs:line 341
   at Cake.Core.CakeEngine.ExecuteTaskAsync(ICakeContext context, IExecutionStrategy strategy, Stopwatch stopWatch, CakeTask task, CakeReport report) in C:\projects\cake\
src\Cake.Core\CakeEngine.cs:line 353
   at Cake.Core.CakeEngine.RunTask(ICakeContext context, IExecutionStrategy strategy, CakeTask task, String target, Stopwatch stopWatch, CakeReport report) in C:\projects
\cake\src\Cake.Core\CakeEngine.cs:line 254
   at Cake.Core.CakeEngine.RunTarget(ICakeContext context, IExecutionStrategy strategy, CakeTask[] orderedTasks, String target, Boolean exclusive, Stopwatch stopWatch, Ca
keReport report) in C:\projects\cake\src\Cake.Core\CakeEngine.cs:line 229
   at Cake.Core.CakeEngine.RunTargetAsync(ICakeContext context, IExecutionStrategy strategy, ExecutionSettings settings) in C:\projects\cake\src\Cake.Core\CakeEngine.cs:l
ine 199
   at Cake.Cli.BuildScriptHost`1.internalRunTargetAsync() in C:\projects\cake\src\Cake.Cli\Hosts\BuildScriptHost.cs:line 87
   at Cake.Cli.BuildScriptHost`1.RunTargetAsync(String target) in C:\projects\cake\src\Cake.Cli\Hosts\BuildScriptHost.cs:line 74
   at Cake.Core.Scripting.ScriptHost.RunTarget(String target) in C:\projects\cake\src\Cake.Core\Scripting\ScriptHost.cs:line 110
   at Submission#0.<<Initialize>>d__0.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult](ImmutableArray`1 precedingExecutors, Func`2 currentExecutor, StrongBox`1 exceptio
nHolderOpt, Func`2 catchExceptionOpt, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Scripting.Script`1.RunSubmissionsAsync(ScriptExecutionState executionState, ImmutableArray`1 precedingExecutors, Func`2 currentExecutor, Func
`2 catchExceptionOpt, CancellationToken cancellationToken)
   at Cake.Infrastructure.Scripting.RoslynScriptSession.Execute(Script script) in C:\projects\cake\src\Cake\Infrastructure\Scripting\RoslynScriptSession.cs:line 206
   at Cake.Core.Scripting.ScriptRunner.Run(IScriptHost host, FilePath scriptPath) in C:\projects\cake\src\Cake.Core\Scripting\ScriptRunner.cs:line 172
   at Cake.Features.Building.BuildFeature.RunCore(ICakeArguments arguments, BuildFeatureSettings settings) in C:\projects\cake\src\Cake\Features\Building\BuildFeature.cs:
line 99
   at Cake.Features.Building.BuildFeature.Run(ICakeArguments arguments, BuildFeatureSettings settings) in C:\projects\cake\src\Cake\Features\Building\BuildFeature.cs:line
 49
   at Cake.Commands.DefaultCommand.Execute(CommandContext context, DefaultCommandSettings settings) in C:\projects\cake\src\Cake\Commands\DefaultCommand.cs:line 76
IlIlIllIllI commented 9 months ago

Any thoughts on this?

IlIlIllIllI commented 9 months ago

I've also reproduced this issue on another coworker's computer, same environment (Windows, x64)

IlIlIllIllI commented 9 months ago

Actually, this also fails with Cake 3.0.0.

Maybe something is happening elsewhere and this isn't a Cake issue?