Skip to content

Errors when using different versions of the same package with type providers in the same solution #11135

Open
@DedSec256

Description

@DedSec256
  1. Create a solution with 2 projects targeting net5 (and MSBuild from net5 sdk)
  2. Add FSharp.Text.RegexProvider v2.1.0/2.0.2 to each project

Expected:
No errors

Actual:
The first open project is successfully type-checked, the second project is open with the message "The type 'Regex' is not defined"
But both projects are built successfully.

Reproduced in Rider (FCS netstandard 2.0, with type providers hosted in .NET 5.0.3 runtime)
and VS Code Ionide 5.3.2

image
image

When FCS tries to instantiate the type provider for the second project, this code fails with "Assembly with same name is already loaded"

Repro:
net5repro.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions