I encountered some odd scripting behavior.
Given a library with same namespace and module name, or same nested module names:
module A =
[<RequireQualifiedAccess>]
module A =
let x = 42
Running this script works fine on first run
, but fails in second run:
open A
-----^
stdin(7,6): error FS0892: This declaration opens the module 'FSI_0002.A.A', which is marked as 'RequireQualifiedAccess'. Adjust your code to use qualified references to the elements of the module instead, e.g. 'List.map' instead of 'map'. This change will ensure that your code is robust as new constructs are added to libraries.
I know why this happens. On the second run, the top level module or namespace is already open, so the open statement tries to open the nested one and fails. Is there a way to make opening of namespaces work in such a scenario? Like requiring the open statement to be fully qualified?
In my use case, I am actually evaluating a script via FCS repeatedly. This script is referencing such a nuget package where namespace and module have the same name.

I encountered some odd scripting behavior.
Given a library with same namespace and module name, or same nested module names:
Running this script works fine on first run
, but fails in second run:
I know why this happens. On the second run, the top level module or namespace is already open, so the

openstatement tries to open the nested one and fails. Is there a way to make opening of namespaces work in such a scenario? Like requiring the open statement to be fully qualified?In my use case, I am actually evaluating a script via FCS repeatedly. This script is referencing such a nuget package where namespace and module have the same name.