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 ]
See original GitHub issueAfter 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:
- Create an F# class library with 2 record types
- Create a C# console app that references the F# library
- 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
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:16 (14 by maintainers)
Top GitHub Comments
Thank you @vzarytovskii & @T-Gro for looking into this and providing insights. I can confirm the workaround does indeed get the compile errors to go away and I can proceed with testing our stack on RC2. Cheers.
This was fixed and inserted to 6.0 and 7.0