PolySharp icon indicating copy to clipboard operation
PolySharp copied to clipboard

`IsExternalInit` not generated correctly in multitargeting projects

Open Lordfirespeed opened this issue 3 months ago • 0 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)

Lordfirespeed avatar Mar 03 '24 09:03 Lordfirespeed