Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Microsoft.FSharp.Compiler/Program.fs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[<EntryPoint>]
let main _ = 0
let main _ = 0
23 changes: 15 additions & 8 deletions src/fsi/fsimain.fs
Original file line number Diff line number Diff line change
Expand Up @@ -394,16 +394,23 @@ let MainMain argv =
|| x = "/shadowcopyreferences+"
|| x = "--shadowcopyreferences+")

if
let executeFsi shadowCopyFiles =
if shadowCopyFiles then
let setupInformation = AppDomain.CurrentDomain.SetupInformation
setupInformation.ShadowCopyFiles <- "true"
let helper = AppDomain.CreateDomain("FSI_Domain", null, setupInformation)
helper.ExecuteAssemblyByName(Assembly.GetExecutingAssembly().GetName())
else
evaluateSession (argv)

let tryShadowCopy =
AppDomain.CurrentDomain.IsDefaultAppDomain()
&& argv |> Array.exists isShadowCopy
then
let setupInformation = AppDomain.CurrentDomain.SetupInformation
setupInformation.ShadowCopyFiles <- "true"
let helper = AppDomain.CreateDomain("FSI_Domain", null, setupInformation)
helper.ExecuteAssemblyByName(Assembly.GetExecutingAssembly().GetName())
else
evaluateSession (argv)

try
executeFsi tryShadowCopy
with :? FileLoadException ->
executeFsi false
#else
evaluateSession (argv)
#endif