Sergio0694 / PolySharp

PolySharp provides generated, source-only polyfills for C# language features, to easily use all runtime-agnostic features downlevel. Add a reference, set your C# version to latest and have fun! 🚀

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`IsExternalInit` not generated correctly in multitargeting projects

Lordfirespeed opened this issue · comments

Reproduction Steps

Make a project that targets netstandard2.1 and net8.0

<TargetFrameworks>netstandard2.1;net8.0</TargetFrameworks>

and add a record class to it with some members, or alternatively a class with required init properties.

Expected Behavior

IsExternalInits type should be included in the compiled assembly targeting netstandard2.1.

Actual Behavior

Compilation succeeds, but IsExternalInits type is not included in the compiled assembly targeting netstandard2.1.

System info

This section should contain useful info such as:

  • PolySharp NuGet version 1.14..1
  • Operating system version Pop!_OS (Ubuntu) 22.04
  • .NET SDK version 8.0.100
  • Runtime is Unity 2022.3.9f1 (implements net48 and netstandard2.1)