{"action":"opened","issue":{"url":"https://api.github.com/repos/cake-build/cake/issues/2335","repository_url":"https://api.github.com/repos/cake-build/cake","labels_url":"https://api.github.com/repos/cake-build/cake/issues/2335/labels{/name}","comments_url":"https://api.github.com/repos/cake-build/cake/issues/2335/comments","events_url":"https://api.github.com/repos/cake-build/cake/issues/2335/events","html_url":"https://github.com/cake-build/cake/issues/2335","id":372322388,"node_id":"MDU6SXNzdWUzNzIzMjIzODg=","number":2335,"title":"Cannot place #load directive in the first line of cake file.","user":{"login":"nawfalhasan","id":2478860,"node_id":"MDQ6VXNlcjI0Nzg4NjA=","avatar_url":"https://avatars2.githubusercontent.com/u/2478860?v=4","gravatar_id":"","url":"https://api.github.com/users/nawfalhasan","html_url":"https://github.com/nawfalhasan","followers_url":"https://api.github.com/users/nawfalhasan/followers","following_url":"https://api.github.com/users/nawfalhasan/following{/other_user}","gists_url":"https://api.github.com/users/nawfalhasan/gists{/gist_id}","starred_url":"https://api.github.com/users/nawfalhasan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nawfalhasan/subscriptions","organizations_url":"https://api.github.com/users/nawfalhasan/orgs","repos_url":"https://api.github.com/users/nawfalhasan/repos","events_url":"https://api.github.com/users/nawfalhasan/events{/privacy}","received_events_url":"https://api.github.com/users/nawfalhasan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-21T14:47:48Z","updated_at":"2018-10-21T14:47:48Z","closed_at":null,"author_association":"NONE","body":"### What You Are Seeing?\r\n\r\n> error CS1024: Preprocessor directive expected\r\n\r\n### What is Expected?\r\n\r\nExternal script file should be loaded and calling functions within the external script should work just fine.\r\n\r\n### What version of Cake are you using?\r\n\r\n0.30.0, full .NET.\r\n\r\n### Are you running on a 32 or 64 bit system?\r\n\r\n64 bit.\r\n\r\n### What environment are you running on?  Windows? Linux? Mac?\r\n\r\nWindows.\r\n\r\n### Are you running on a CI Server?  If so, which one?\r\n\r\nNo.\r\n\r\n### How Did You Get This To Happen? (Steps to Reproduce)\r\n\r\n1. In the `tools` folder, create 3 files: `build.cake`, `build.ps1` and `git.csx`.\r\n\r\nContent of `build.cake`:\r\n```\r\n﻿#l \"git.csx\"\r\n\r\nRunGitCommand();\r\n```\r\n\r\nContent of `build.ps1`:\r\n```\r\n.'tools\\Cake\\Cake.exe'\r\npause\r\n```\r\n\r\nContent of `git.csx`:\r\n```\r\nRunGitCommand()\r\n{\r\n}\r\n```\r\n2. Run `build.ps1`\r\n\r\n`\r\n### Output Log\r\nLog when  I run `.'tools\\Cake\\Cake.exe' --verbosity=diagnostic -mono -experimental >log.txt`\r\n\r\n> C:/GitSource/RBSExpress2/Build/Cake/build.cake(1,3): error CS1024: Preprocessor directive expected\r\n> C:/GitSource/RBSExpress2/Build/Cake/build.cake(3,1): error CS0103: The name 'RunGitCommand' does not exist in the current context\r\n> Error: Cake.Core.CakeException: Error(s) occurred when compiling build script:\r\n> C:/GitSource/RBSExpress2/Build/Cake/build.cake(1,3): error CS1024: Preprocessor directive expected\r\n> C:/GitSource/RBSExpress2/Build/Cake/build.cake(3,1): error CS0103: The name 'RunGitCommand' does not exist in the current context\r\n>    at Cake.Scripting.Roslyn.RoslynScriptSession.Execute(Script script)\r\n>    at Cake.Core.Scripting.ScriptRunner.Run(IScriptHost host, FilePath scriptPath, IDictionary`2 arguments)\r\n>    at Cake.Commands.BuildCommand.Execute(CakeOptions options)\r\n>    at Cake.CakeApplication.Run(CakeOptions options)\r\n>    at Cake.Program.Main()\r\n\r\n~~~sh\r\nDetailed log:\r\n\r\nModule directory does not exist.\r\nNuGet.config not found.\r\nAnalyzing build script...\r\nAnalyzing C:/GitSource/RBSExpress2/Build/Cake/build.cake...\r\nProcessing build script...\r\nAdding assembly reference to mscorlib.dll...\r\nAdding assembly reference to System.Core.dll...\r\nAdding assembly reference to Cake.Core.dll...\r\nAdding assembly reference to Cake.Common.dll...\r\nAdding assembly reference to Cake.exe...\r\nAdding assembly reference to System.dll...\r\nAdding assembly reference to System.Xml.dll...\r\nAdding assembly reference to System.Xml.Linq.dll...\r\nAdding assembly reference to System.Data.dll...\r\nAdding assembly reference to System.Runtime.dll...\r\nAdding assembly reference to System.Collections.dll...\r\nAdding assembly reference to netstandard.dll...\r\nImporting namespace Cake.Common...\r\nImporting namespace Cake.Common.Build...\r\nImporting namespace Cake.Common.Build.AppVeyor...\r\nImporting namespace Cake.Common.Build.AppVeyor.Data...\r\nImporting namespace Cake.Common.Build.Bamboo...\r\nImporting namespace Cake.Common.Build.Bamboo.Data...\r\nImporting namespace Cake.Common.Build.BitbucketPipelines...\r\nImporting namespace Cake.Common.Build.BitbucketPipelines.Data...\r\nImporting namespace Cake.Common.Build.Bitrise...\r\nImporting namespace Cake.Common.Build.Bitrise.Data...\r\nImporting namespace Cake.Common.Build.ContinuaCI...\r\nImporting namespace Cake.Common.Build.ContinuaCI.Data...\r\nImporting namespace Cake.Common.Build.GitLabCI...\r\nImporting namespace Cake.Common.Build.GitLabCI.Data...\r\nImporting namespace Cake.Common.Build.GoCD...\r\nImporting namespace Cake.Common.Build.GoCD.Data...\r\nImporting namespace Cake.Common.Build.Jenkins...\r\nImporting namespace Cake.Common.Build.Jenkins.Data...\r\nImporting namespace Cake.Common.Build.MyGet...\r\nImporting namespace Cake.Common.Build.TeamCity...\r\nImporting namespace Cake.Common.Build.TFBuild...\r\nImporting namespace Cake.Common.Build.TFBuild.Data...\r\nImporting namespace Cake.Common.Build.TravisCI...\r\nImporting namespace Cake.Common.Build.TravisCI.Data...\r\nImporting namespace Cake.Common.Diagnostics...\r\nImporting namespace Cake.Common.IO...\r\nImporting namespace Cake.Common.IO.Paths...\r\nImporting namespace Cake.Common.Net...\r\nImporting namespace Cake.Common.Security...\r\nImporting namespace Cake.Common.Solution...\r\nImporting namespace Cake.Common.Solution.Project...\r\nImporting namespace Cake.Common.Solution.Project.Properties...\r\nImporting namespace Cake.Common.Solution.Project.XmlDoc...\r\nImporting namespace Cake.Common.Text...\r\nImporting namespace Cake.Common.Tools...\r\nImporting namespace Cake.Common.Tools.Cake...\r\nImporting namespace Cake.Common.Tools.Chocolatey...\r\nImporting namespace Cake.Common.Tools.Chocolatey.ApiKey...\r\nImporting namespace Cake.Common.Tools.Chocolatey.Config...\r\nImporting namespace Cake.Common.Tools.Chocolatey.Download...\r\nImporting namespace Cake.Common.Tools.Chocolatey.Features...\r\nImporting namespace Cake.Common.Tools.Chocolatey.Install...\r\nImporting namespace Cake.Common.Tools.Chocolatey.New...\r\nImporting namespace Cake.Common.Tools.Chocolatey.Pack...\r\nImporting namespace Cake.Common.Tools.Chocolatey.Pin...\r\nImporting namespace Cake.Common.Tools.Chocolatey.Push...\r\nImporting namespace Cake.Common.Tools.Chocolatey.Sources...\r\nImporting namespace Cake.Common.Tools.Chocolatey.Uninstall...\r\nImporting namespace Cake.Common.Tools.Chocolatey.Upgrade...\r\nImporting namespace Cake.Common.Tools.DotCover...\r\nImporting namespace Cake.Common.Tools.DotCover.Analyse...\r\nImporting namespace Cake.Common.Tools.DotCover.Cover...\r\nImporting namespace Cake.Common.Tools.DotCover.Merge...\r\nImporting namespace Cake.Common.Tools.DotCover.Report...\r\nImporting namespace Cake.Common.Tools.DotNetCore...\r\nImporting namespace Cake.Common.Tools.DotNetCore.Build...\r\nImporting namespace Cake.Common.Tools.DotNetCore.Clean...\r\nImporting namespace Cake.Common.Tools.DotNetCore.Execute...\r\nImporting namespace Cake.Common.Tools.DotNetCore.MSBuild...\r\nImporting namespace Cake.Common.Tools.DotNetCore.NuGet.Delete...\r\nImporting namespace Cake.Common.Tools.DotNetCore.NuGet.Push...\r\nImporting namespace Cake.Common.Tools.DotNetCore.Pack...\r\nImporting namespace Cake.Common.Tools.DotNetCore.Publish...\r\nImporting namespace Cake.Common.Tools.DotNetCore.Restore...\r\nImporting namespace Cake.Common.Tools.DotNetCore.Run...\r\nImporting namespace Cake.Common.Tools.DotNetCore.Test...\r\nImporting namespace Cake.Common.Tools.DotNetCore.Tool...\r\nImporting namespace Cake.Common.Tools.DotNetCore.VSTest...\r\nImporting namespace Cake.Common.Tools.DupFinder...\r\nImporting namespace Cake.Common.Tools.Fixie...\r\nImporting namespace Cake.Common.Tools.GitLink...\r\nImporting namespace Cake.Common.Tools.GitReleaseManager...\r\nImporting namespace Cake.Common.Tools.GitReleaseManager.AddAssets...\r\nImporting namespace Cake.Common.Tools.GitReleaseManager.Close...\r\nImporting namespace Cake.Common.Tools.GitReleaseManager.Create...\r\nImporting namespace Cake.Common.Tools.GitReleaseManager.Export...\r\nImporting namespace Cake.Common.Tools.GitReleaseManager.Publish...\r\nImporting namespace Cake.Common.Tools.GitReleaseNotes...\r\nImporting namespace Cake.Common.Tools.GitVersion...\r\nImporting namespace Cake.Common.Tools.ILMerge...\r\nImporting namespace Cake.Common.Tools.ILRepack...\r\nImporting namespace Cake.Common.Tools.InnoSetup...\r\nImporting namespace Cake.Common.Tools.InspectCode...\r\nImporting namespace Cake.Common.Tools.MSBuild...\r\nImporting namespace Cake.Common.Tools.MSpec...\r\nImporting namespace Cake.Common.Tools.MSTest...\r\nImporting namespace Cake.Common.Tools.NSIS...\r\nImporting namespace Cake.Common.Tools.NuGet...\r\nImporting namespace Cake.Common.Tools.NuGet.Add...\r\nImporting namespace Cake.Common.Tools.NuGet.Init...\r\nImporting namespace Cake.Common.Tools.NuGet.Install...\r\nImporting namespace Cake.Common.Tools.NuGet.List...\r\nImporting namespace Cake.Common.Tools.NuGet.Pack...\r\nImporting namespace Cake.Common.Tools.NuGet.Push...\r\nImporting namespace Cake.Common.Tools.NuGet.Restore...\r\nImporting namespace Cake.Common.Tools.NuGet.SetApiKey...\r\nImporting namespace Cake.Common.Tools.NuGet.SetProxy...\r\nImporting namespace Cake.Common.Tools.NuGet.Sources...\r\nImporting namespace Cake.Common.Tools.NuGet.Update...\r\nImporting namespace Cake.Common.Tools.NUnit...\r\nImporting namespace Cake.Common.Tools.OctopusDeploy...\r\nImporting namespace Cake.Common.Tools.OpenCover...\r\nImporting namespace Cake.Common.Tools.ReportGenerator...\r\nImporting namespace Cake.Common.Tools.ReportUnit...\r\nImporting namespace Cake.Common.Tools.Roundhouse...\r\nImporting namespace Cake.Common.Tools.SignTool...\r\nImporting namespace Cake.Common.Tools.SpecFlow...\r\nImporting namespace Cake.Common.Tools.SpecFlow.StepDefinitionReport...\r\nImporting namespace Cake.Common.Tools.SpecFlow.TestExecutionReport...\r\nImporting namespace Cake.Common.Tools.TextTransform...\r\nImporting namespace Cake.Common.Tools.VSTest...\r\nImporting namespace Cake.Common.Tools.VSWhere...\r\nImporting namespace Cake.Common.Tools.VSWhere.All...\r\nImporting namespace Cake.Common.Tools.VSWhere.Latest...\r\nImporting namespace Cake.Common.Tools.VSWhere.Legacy...\r\nImporting namespace Cake.Common.Tools.VSWhere.Product...\r\nImporting namespace Cake.Common.Tools.WiX...\r\nImporting namespace Cake.Common.Tools.WiX.Heat...\r\nImporting namespace Cake.Common.Tools.XBuild...\r\nImporting namespace Cake.Common.Tools.XUnit...\r\nImporting namespace Cake.Common.Xml...\r\nImporting namespace Cake.Core...\r\nImporting namespace Cake.Core.Diagnostics...\r\nImporting namespace Cake.Core.IO...\r\nImporting namespace Cake.Core.Scripting...\r\nImporting namespace System...\r\nImporting namespace System.Collections.Generic...\r\nImporting namespace System.IO...\r\nImporting namespace System.Linq...\r\nImporting namespace System.Text...\r\nImporting namespace System.Threading.Tasks...\r\nCompiling build script...\r\n~~~"}}
{"actor":{"display_login":"nawfalhasan"}}