cake-build / cake-vscode

Contains Cake extension for Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=cake-build.cake-vscode
MIT License
42 stars 33 forks source link

Debugging cake scripts in visual studio code and using #load #497

Open robgha01 opened 7 years ago

robgha01 commented 7 years ago

Its simply not working no scripts are loaded see the zip in this issue https://github.com/cake-build/cake/issues/1588 i get messages indicating that it cant find variables etc that live inside the #load script. Anyone of @mholo65 and @agc93 knows anything about this ?

The zip: https://1drv.ms/u/s!AvOXr9f-QF0p22E1gMD_I9kTNWLS

bjorkstromm commented 7 years ago

@robgha01 is it only when debugging or does it also happen when running the script without debugging? Could you paste verbose log of what is happening (i.e. set --Verbosity Diagnostic). Thanks!

robgha01 commented 7 years ago

@mholo65 i get this when i debug

D:\Workspaces\BlueLeet\BlueLeet.UCodeFirst\Build>dotnet tools/Cake.CoreCLR/Cake.dll build.cake --verbosity=diagnostic --debug
Module directory does not exist.
Performing debug...
Attach debugger to process 22116 to continue
Debugger attached
Analyzing build script...
Analyzing D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake...
Processing build script...
Adding reference to System.Private.CoreLib.ni.dll...
Adding reference to System.Linq.Expressions.dll...
Adding reference to Cake.Core.dll...
Adding reference to Cake.Common.dll...
Adding reference to System.Runtime.dll...
Adding reference to System.Diagnostics.Debug.dll...
Adding reference to System.Collections.dll...
Adding reference to System.Runtime.Extensions.dll...
Adding reference to System.Reflection.dll...
Adding reference to System.Console.dll...
Adding reference to System.Runtime.Loader.dll...
Adding reference to Microsoft.Extensions.DependencyModel.dll...
Adding reference to System.IO.dll...
Adding reference to System.Text.RegularExpressions.dll...
Adding reference to System.Reflection.Primitives.dll...
Adding reference to System.Diagnostics.Process.dll...
Adding reference to System.IO.FileSystem.dll...
Adding reference to System.IO.FileSystem.Primitives.dll...
Adding reference to System.Text.Encoding.dll...
Adding reference to System.Collections.Concurrent.dll...
Adding reference to Microsoft.Win32.Registry.dll...
Adding reference to System.Linq.dll...
Adding reference to System.Globalization.dll...
Adding reference to System.Threading.dll...
Adding reference to System.Reflection.Extensions.dll...
Adding reference to System.Runtime.InteropServices.dll...
Adding reference to System.Reflection.TypeExtensions.dll...
Adding reference to System.Runtime.InteropServices.RuntimeInformation.dll...
Adding reference to System.ComponentModel.TypeConverter.dll...
Adding reference to System.Xml.ReaderWriter.dll...
Adding reference to System.Xml.XmlDocument.dll...
Adding reference to System.Security.Cryptography.Primitives.dll...
Adding reference to System.Xml.XDocument.dll...
Adding reference to System.Runtime.Serialization.Json.dll...
Adding reference to System.Net.Http.dll...
Adding reference to System.Threading.Tasks.dll...
Adding reference to System.IO.Compression.dll...
Adding reference to System.Runtime.Serialization.Primitives.dll...
Adding reference to System.Xml.XPath.XmlDocument.dll...
Adding reference to System.Text.Encoding.Extensions.dll...
Adding reference to System.Security.Cryptography.Algorithms.dll...
Adding reference to System.IO.Compression.ZipFile.dll...
Adding reference to System.Net.Primitives.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.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.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.TFBuild...
Importing namespace Cake.Common.Build.TFBuild.Data...
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...
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.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.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.DotNetCore...
Importing namespace Cake.Common.Tools.DotNetCore.Build...
Importing namespace Cake.Common.Tools.DotNetCore.Execute...
Importing namespace Cake.Common.Tools.DotNetCore.Pack...
Importing namespace Cake.Common.Tools.DotNetCore.Publish...
Importing namespace Cake.Common.Tools.DotNetCore.Restore...
Importing namespace Cake.Common.Tools.DotNetCore.Run...
Importing namespace Cake.Common.Tools.DotNetCore.Test...
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.Export...
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.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.Init...
Importing namespace Cake.Common.Tools.NuGet.Install...
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.WiX...
Importing namespace Cake.Common.Tools.WiX.Heat...
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.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 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 for debugging...
Error: Cake.Core.CakeException: Error occurred when compiling: D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(7,19): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(7,5): error CS0103: The name 'RequireFolder' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(8,19): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(8,5): error CS0103: The name 'RequireFolder' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(16,52): error CS0103: The name 'projectName' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(16,24): error CS0103: The name 'projectRoot' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(17,23): error CS0103: The name 'projectRoot' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(18,31): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(19,27): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(23,73): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(24,75): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(31,67): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(32,66): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(35,47): error CS0103: The name 'projectName' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(35,19): error CS0103: The name 'projectRoot' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(35,79): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(38,28): error CS0103: The name 'projectName' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(40,59): error CS0103: The name 'configuration' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(40,77): error CS0103: The name 'projectName' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(40,51): error CS0103: The name 'FromBin' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(42,48): error CS0103: The name 'projectName' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(42,63): error CS0103: The name 'packageVersion' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(42,21): error CS0103: The name 'CreateNuGetPackSettings' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(43,26): error CS0103: The name 'projectName' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(44,29): error CS0103: The name 'projectName' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(45,5): error CS1656: Cannot assign to 'Description' because it is a 'method group'
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(54,27): error CS0103: The name 'projectName' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(63,50): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(64,50): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(65,50): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(66,47): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(68,29): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(72,50): error CS0103: The name 'projectName' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(72,65): error CS0103: The name 'packageVersion' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(72,23): error CS0103: The name 'CreateNuGetPackSettings' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(82,38): error CS0103: The name 'targetOutput' does not exist in the current context
   at Cake.Scripting.XPlat.DebugXPlatScriptSession.Execute(Script script)
   at Cake.Core.Scripting.ScriptRunner.Run(IScriptHost host, FilePath scriptPath, IDictionary`2 arguments)
   at Cake.Commands.DebugCommand.Execute(CakeOptions options)
   at Cake.CakeApplication.Run(CakeOptions options)
   at Cake.Program.Main()

When i remove the --debug it seams to be the same:

D:\Workspaces\BlueLeet\BlueLeet.UCodeFirst\Build>dotnet tools/Cake.CoreCLR/Cake.dll build.cake --verbosity=diagnostic
Module directory does not exist.
Analyzing build script...
Analyzing D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake...
Processing build script...
Adding reference to System.Private.CoreLib.ni.dll...
Adding reference to System.Linq.Expressions.dll...
Adding reference to Cake.Core.dll...
Adding reference to Cake.Common.dll...
Adding reference to System.Runtime.dll...
Adding reference to System.Diagnostics.Debug.dll...
Adding reference to System.Collections.dll...
Adding reference to System.Runtime.Extensions.dll...
Adding reference to System.Reflection.dll...
Adding reference to System.Console.dll...
Adding reference to System.Runtime.Loader.dll...
Adding reference to Microsoft.Extensions.DependencyModel.dll...
Adding reference to System.IO.dll...
Adding reference to System.Text.RegularExpressions.dll...
Adding reference to System.Reflection.Primitives.dll...
Adding reference to System.Diagnostics.Process.dll...
Adding reference to System.IO.FileSystem.dll...
Adding reference to System.IO.FileSystem.Primitives.dll...
Adding reference to System.Text.Encoding.dll...
Adding reference to System.Collections.Concurrent.dll...
Adding reference to Microsoft.Win32.Registry.dll...
Adding reference to System.Linq.dll...
Adding reference to System.Globalization.dll...
Adding reference to System.Threading.dll...
Adding reference to System.Reflection.Extensions.dll...
Adding reference to System.Runtime.InteropServices.dll...
Adding reference to System.Reflection.TypeExtensions.dll...
Adding reference to System.Runtime.InteropServices.RuntimeInformation.dll...
Adding reference to System.ComponentModel.TypeConverter.dll...
Adding reference to System.Xml.ReaderWriter.dll...
Adding reference to System.Xml.XmlDocument.dll...
Adding reference to System.Security.Cryptography.Primitives.dll...
Adding reference to System.Xml.XDocument.dll...
Adding reference to System.Runtime.Serialization.Json.dll...
Adding reference to System.Net.Http.dll...
Adding reference to System.Threading.Tasks.dll...
Adding reference to System.IO.Compression.dll...
Adding reference to System.Runtime.Serialization.Primitives.dll...
Adding reference to System.Xml.XPath.XmlDocument.dll...
Adding reference to System.Text.Encoding.Extensions.dll...
Adding reference to System.Security.Cryptography.Algorithms.dll...
Adding reference to System.IO.Compression.ZipFile.dll...
Adding reference to System.Net.Primitives.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.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.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.TFBuild...
Importing namespace Cake.Common.Build.TFBuild.Data...
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...
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.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.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.DotNetCore...
Importing namespace Cake.Common.Tools.DotNetCore.Build...
Importing namespace Cake.Common.Tools.DotNetCore.Execute...
Importing namespace Cake.Common.Tools.DotNetCore.Pack...
Importing namespace Cake.Common.Tools.DotNetCore.Publish...
Importing namespace Cake.Common.Tools.DotNetCore.Restore...
Importing namespace Cake.Common.Tools.DotNetCore.Run...
Importing namespace Cake.Common.Tools.DotNetCore.Test...
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.Export...
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.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.Init...
Importing namespace Cake.Common.Tools.NuGet.Install...
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.WiX...
Importing namespace Cake.Common.Tools.WiX.Heat...
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.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 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...
Error: Microsoft.CodeAnalysis.Scripting.CompilationErrorException: D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(7,19): error CS0103: The name 'tmpDir' does not exist in the current context
   at Microsoft.CodeAnalysis.Scripting.ScriptBuilder.ThrowIfAnyCompilationErrors(DiagnosticBag diagnostics, DiagnosticFormatter formatter)
   at Microsoft.CodeAnalysis.Scripting.ScriptBuilder.CreateExecutor[T](ScriptCompiler compiler, Compilation compilation, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Scripting.Script`1.GetExecutor(CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Scripting.Script`1.RunAsync(Object globals, Func`2 catchException, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.CSharp.Scripting.CSharpScript.RunAsync[T](String code, ScriptOptions options, Object globals, Type globalsType, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.CSharp.Scripting.CSharpScript.EvaluateAsync(String code, ScriptOptions options, Object globals, Type globalsType, CancellationToken cancellationToken)
   at Cake.Scripting.XPlat.DefaultXPlatScriptSession.Execute(Script script)
   at Cake.Core.Scripting.ScriptRunner.Run(IScriptHost host, FilePath scriptPath, IDictionary`2 arguments)
   at Cake.Commands.BuildCommand.Execute(CakeOptions options)
   at Cake.CakeApplication.Run(CakeOptions options)
   at Cake.Program.Main()
robgha01 commented 7 years ago

The build scripts looks like this: https://gist.github.com/robgha01/6393b59e11694f6f135e95c5c93b376b

bjorkstromm commented 7 years ago

@robgha01 what happens if you move #load nuget:?package=BlueLeet.Build to the top in build.cake?

robgha01 commented 7 years ago

@mholo65 i get the same error the load is now at the top line 1 before anything else:

D:\Workspaces\BlueLeet\BlueLeet.UCodeFirst\Build>dotnet ../.tools/Cake.CoreCLR/Cake.dll build.cake --verbosity=diagnostic --debug
Module directory does not exist.
Performing debug...
Attach debugger to process 28688 to continue
Debugger attached
Analyzing build script...
Analyzing D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake...
Processing build script...
Adding reference to System.Private.CoreLib.ni.dll...
Adding reference to System.Linq.Expressions.dll...
Adding reference to Cake.Core.dll...
Adding reference to Cake.Common.dll...
Adding reference to System.Runtime.dll...
Adding reference to System.Diagnostics.Debug.dll...
Adding reference to System.Collections.dll...
Adding reference to System.Runtime.Extensions.dll...
Adding reference to System.Reflection.dll...
Adding reference to System.Console.dll...
Adding reference to System.Runtime.Loader.dll...
Adding reference to Microsoft.Extensions.DependencyModel.dll...
Adding reference to System.IO.dll...
Adding reference to System.Text.RegularExpressions.dll...
Adding reference to System.Reflection.Primitives.dll...
Adding reference to System.Diagnostics.Process.dll...
Adding reference to System.IO.FileSystem.dll...
Adding reference to System.IO.FileSystem.Primitives.dll...
Adding reference to System.Text.Encoding.dll...
Adding reference to System.Collections.Concurrent.dll...
Adding reference to Microsoft.Win32.Registry.dll...
Adding reference to System.Linq.dll...
Adding reference to System.Globalization.dll...
Adding reference to System.Threading.dll...
Adding reference to System.Reflection.Extensions.dll...
Adding reference to System.Runtime.InteropServices.dll...
Adding reference to System.Reflection.TypeExtensions.dll...
Adding reference to System.Runtime.InteropServices.RuntimeInformation.dll...
Adding reference to System.ComponentModel.TypeConverter.dll...
Adding reference to System.Xml.ReaderWriter.dll...
Adding reference to System.Xml.XmlDocument.dll...
Adding reference to System.Security.Cryptography.Primitives.dll...
Adding reference to System.Xml.XDocument.dll...
Adding reference to System.Runtime.Serialization.Json.dll...
Adding reference to System.Net.Http.dll...
Adding reference to System.Threading.Tasks.dll...
Adding reference to System.IO.Compression.dll...
Adding reference to System.Runtime.Serialization.Primitives.dll...
Adding reference to System.Xml.XPath.XmlDocument.dll...
Adding reference to System.Text.Encoding.Extensions.dll...
Adding reference to System.Security.Cryptography.Algorithms.dll...
Adding reference to System.IO.Compression.ZipFile.dll...
Adding reference to System.Net.Primitives.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.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.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.TFBuild...
Importing namespace Cake.Common.Build.TFBuild.Data...
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...
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.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.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.DotNetCore...
Importing namespace Cake.Common.Tools.DotNetCore.Build...
Importing namespace Cake.Common.Tools.DotNetCore.Execute...
Importing namespace Cake.Common.Tools.DotNetCore.Pack...
Importing namespace Cake.Common.Tools.DotNetCore.Publish...
Importing namespace Cake.Common.Tools.DotNetCore.Restore...
Importing namespace Cake.Common.Tools.DotNetCore.Run...
Importing namespace Cake.Common.Tools.DotNetCore.Test...
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.Export...
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.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.Init...
Importing namespace Cake.Common.Tools.NuGet.Install...
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.WiX...
Importing namespace Cake.Common.Tools.WiX.Heat...
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.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 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 for debugging...
Error: Cake.Core.CakeException: Error occurred when compiling: D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(9,19): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(9,5): error CS0103: The name 'RequireFolder' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(10,19): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(10,5): error CS0103: The name 'RequireFolder' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(18,52): error CS0103: The name 'projectName' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(18,24): error CS0103: The name 'projectRoot' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(19,23): error CS0103: The name 'projectRoot' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(20,31): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(21,27): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(25,73): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(26,75): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(33,67): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(34,66): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(37,47): error CS0103: The name 'projectName' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(37,19): error CS0103: The name 'projectRoot' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(37,79): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(40,28): error CS0103: The name 'projectName' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(42,59): error CS0103: The name 'configuration' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(42,77): error CS0103: The name 'projectName' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(42,51): error CS0103: The name 'FromBin' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(44,48): error CS0103: The name 'projectName' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(44,63): error CS0103: The name 'packageVersion' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(44,21): error CS0103: The name 'CreateNuGetPackSettings' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(45,26): error CS0103: The name 'projectName' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(46,29): error CS0103: The name 'projectName' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(47,5): error CS1656: Cannot assign to 'Description' because it is a 'method group'
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(56,27): error CS0103: The name 'projectName' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(65,50): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(66,50): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(67,50): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(68,47): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(70,29): error CS0103: The name 'tmpDir' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(74,50): error CS0103: The name 'projectName' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(74,65): error CS0103: The name 'packageVersion' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(74,23): error CS0103: The name 'CreateNuGetPackSettings' does not exist in the current context
D:/Workspaces/BlueLeet/BlueLeet.UCodeFirst/Build/build.cake(84,38): error CS0103: The name 'targetOutput' does not exist in the current context
   at Cake.Scripting.XPlat.DebugXPlatScriptSession.Execute(Script script)
   at Cake.Core.Scripting.ScriptRunner.Run(IScriptHost host, FilePath scriptPath, IDictionary`2 arguments)
   at Cake.Commands.DebugCommand.Execute(CakeOptions options)
   at Cake.CakeApplication.Run(CakeOptions options)
   at Cake.Program.Main()

I think for some reason the #load is not including the script. as it is the same if i use it at top and bottom ?

robgha01 commented 7 years ago

@mholo65 i tested with this: #load "../.tools/BlueLeet.Build/content/base.cake" and now the script is getting included and i don't get that error so the problem is #load is not updated for the Cake.CoreCLR as in its not working for nuget packages ? it must be missing for some reason or someting may need to get fixed for it to work in CLR ? @gep13 you know anything about this ?

gep13 commented 7 years ago

@robgha01 if you are using Cake.CoreCLR then you can only use addins that are built for .net core. Some of the addins that you are using don't support .net core yet.

bjorkstromm commented 7 years ago

@robgha01 does it work when not using Cake.CoreCLR?

robgha01 commented 7 years ago

@gep13 @mholo65 yes it works if i dont use the CoreCLR but the #load is still not including the base script is it because im using addins that are not supported ?