The new .NET SDK project generator lacks the ability to set the <PlatformTarget> property. This patch adds a similar code snippet from the legacy project generator which refers to /platform:xxx compiler flag.
<PlatformTarget>
/platform:xxx
Fixes: #23513 Issue: #23190