If a project contains two modules with the same name, one of which is marked with ModuleSuffix attribute:
// Foo1.fs
namespace Library
[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
module Foo =
let bar x = x
// Foo2.fs
module Library.Foo
let buzz x = x
symbols defined in the marked with ModuleSuffix attribute one are not seen in projects referencing this one:


The bug (feature?) was found while moving ExtCore library to .NET Standard 2.0
Minimal repro https://github.com/vasily-kirichenko/TwoModulesBug
It's compiled to (ILSpy):
namespace Library
{
[CompilationMapping(SourceConstructFlags.Module)]
public static class Foo
{
public static a buzz<a>(a x)
{
return x;
}
}
}
namespace Library
{
[CompilationMapping(SourceConstructFlags.Module), CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)]
public static class FooModule
{
public static a bar<a>(a x)
{
return x;
}
}
}
If a project contains two modules with the same name, one of which is marked with
ModuleSuffixattribute:symbols defined in the marked with
ModuleSuffixattribute one are not seen in projects referencing this one:The bug (feature?) was found while moving ExtCore library to .NET Standard 2.0
Minimal repro https://github.com/vasily-kirichenko/TwoModulesBug
It's compiled to (ILSpy):