question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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 issue

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:16 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
buvinghausencommented, Oct 12, 2022

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.

1reaction
vzarytovskiicommented, Oct 24, 2022

This was fixed and inserted to 6.0 and 7.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

NETSDK1141: Unable to resolve the .NET SDK version as ...
json file was not installed. The SDK version specified in global.json could not be found, due to an incorrect path. How to fix...
Read more >
Profile for GitHub
Entries property provides access to the form data and the FormDataProvider. ... C:\Program Files\dotnet\sdk\7.0.100-rc.2.22477.23\Sdks\Microsoft.NET.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found