diff --git a/fsxc/Fsxc.fs b/fsxc/Fsxc.fs index 7eb8bc0..5d2c2b4 100644 --- a/fsxc/Fsxc.fs +++ b/fsxc/Fsxc.fs @@ -580,13 +580,15 @@ module Program = | Some location -> location #endif - let initialInjectedContents = - """module FsxScript + let initialFileContent = + """[] +module FsxScript type FsiStub = { CommandLineArgs: array } let fsi = { CommandLineArgs = System.Environment.GetCommandLineArgs() } """ let autogeneratedFile = GetAutoGenerationTargets origScript "fs" + let initFile = GetAutoGenerationTargets origScript "init.fs" let binFolder = autogeneratedFile.Directory @@ -597,11 +599,18 @@ let fsi = { CommandLineArgs = System.Environment.GetCommandLineArgs() } File.WriteAllText( autogeneratedFile.FullName, - initialInjectedContents + String.Empty + ) + + File.WriteAllText( + initFile.FullName, + initialFileContent ) seq { + yield CompilerInput.SourceFile initFile + let startCommentInFSharp = "// " for maybeDep in contents do