Skip to content

F# records in reference assembly (/ref folder) are missing properties except for the last record in file [regression with 7.0.100-rc.2.22477.23 SDK ] #14088

@buvinghausen

Description

@buvinghausen

After downloading and installing the latest 7.0.100-rc.2.22477.23 SDK I can no longer compile my C# libraries because if any code appears after the F# record declaration the compiler will throw a CS0117 error if you try to set a property on a CLIMutable record and/or a CS1061 error if you try to get any property on a record from C#.

Repro steps

Provide the steps required to reproduce the problem:

  1. Create an F# class library with 2 record types
  2. Create a C# console app that references the F# library
  3. Initialize the first record declaration and attempt to access the properties in the C# console

Clone here to speed up the repro

Expected behavior

Expect to be able to still use F# records in C# after F# code appears after them

Actual behavior

CS0117 if you attempt to set/initialize an F# record property where F# code appears after the record declaration
CS1061 if you attempt to get the value from an F# record property where F# code appears after the record declaration

Known workarounds

<ProduceReferenceAssembly>false</ProduceReferenceAssembly>

Related information

7.0.100-rc.2.22477.23 SDK on both Windows & Ubuntu

Metadata

Metadata

Assignees

Labels

Area-CompilerCompiler-related issues which don't belong to other categoriesBugImpact-High(Internal MS Team use only) Describes an issue with extreme impact on existing code.Regressionrelease/17.5

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions