Merge branch 'fix-csharp-target-type' into release-3.12

Merge-request: !2427