Skip to content

Issue with consuming DLLs built with .NET7 from .NET6 #14313

Description

@vzarytovskii
  1. Build a library which has langversion=7 and targets net6.0, using net7.0 SDK
    1. Library should involve some sort of SRTP code (with either new or old syntax).
  2. Reference this library in a project which targets net6.0 and uses net6.0 SDK

This will result in Error reading/writing metadata for the F# compiled DLL '%s'. Was the DLL compiled with an earlier version of the F# compiler? (error: 'u_trait_sln')..

This is sort of by design, since we're technically picking some data which is unknown to the old compiler.

The general recommendation is to move to .NET7 SDK on the consumer side, or target .NET7, when langversion 7 is needed to be used.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions