dotnet / dotnet/project-system
"Prefer32Bit" property remains true when PlatformTarget is x64, but checkbox is empty and disabled.
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
**Visual Studio Version**: 16.2.3
**Summary**:
When setting a .NET Framework project's target to x64, the "Prefer32Bit" flag keeps its previous value, even if it was "true". This behavior seems to have changed at some point, because I have logic in custom build targets that rely on it being "false" if PlatformTarget is x64, and that logic was working previously (in Visual Studio 2017, at least).

It seems to retain this value in the project even though the checkbox is disabled. If I switch targets and uncheck it manually, then that setting persists.

**Expected Behavior**: PlatformTarget==x64 implies Prefer32Bit==false (or absent entirely from the project)
**Actual Behavior**: Prefer32Bit is treated as an entirely distinct property which doesn't adapt to PlatformTarget.
**User Impact**: Custom build targets relying on this property no longer work. In my case, 32-bit assets are deployed into x64 projects.
Contributor guide
Assessment
This issue has not been assessed yet.