Skip to content

[release/7.0.1xx] Produce a warning and ignore Prefer32Bit for netcoreapp - #27796

Merged
VSadov merged 3 commits into
dotnet:release/7.0.1xxfrom
VSadov:pref32bitPort
Sep 12, 2022
Merged

VSadov merged 3 commits into
dotnet:release/7.0.1xxfrom
VSadov:pref32bitPort

Conversation

@VSadov

@VSadov VSadov commented Sep 9, 2022

Copy link
Copy Markdown
Member

Backport of #27776


Fixes:dotnet/runtime#70776

Prefer32Bit is a way to control how OS loader loads a managed .exe. It does not make sense for a .dll and the loader would refuse to load such .dll.
For netcoreapp target Prefer32Bit results in an app that cannot run.

With this change we produce a warning when building for netcoreapp >= 7.0 target and ignore the setting.

@ghost

ghost commented Sep 9, 2022

Copy link
Copy Markdown

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@VSadov
VSadov marked this pull request as ready for review September 9, 2022 18:46
@VSadov
VSadov requested a review from vitek-karas September 9, 2022 18:46
VSadov and others added 2 commits September 12, 2022 09:31
* Check for and switch off Prefer32Bit for >= 7.0

* add Prefer32Bit in the test

* added a distinct warning message

@jeffschwMSFT jeffschwMSFT left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved. once we get a clean ci we can merge

@VSadov
VSadov enabled auto-merge (squash) September 12, 2022 19:36
@VSadov
VSadov merged commit 3c5ba92 into dotnet:release/7.0.1xx Sep 12, 2022
@VSadov
VSadov deleted the pref32bitPort branch September 12, 2022 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants