Will .net8 support 32 bit Application when built on "Any CPU" Configuration

Sreekanth N Kartha 60 Reputation points
2025-04-28T07:09:16.3733333+00:00

I am not able to run an application that is built on "Any CPU" configuration in 32 bit OS, but if i explicitly provide the architecture as x86 the application works properly. Will .net8 still support 32 bit application when built on "Any CPU" configuration.

Error I am receiving:

User's image

Developer technologies | .NET | .NET Runtime
{count} votes

Answer accepted by question author
  1. RLWA32 51,536 Reputation points
    2025-04-28T08:49:27.21+00:00

    In .Net 8 building for "Any CPU" does not have the same meaning as it did when using the .Net Framework.

    When VS2022 builds a .Net 8 application (.exe) it actually creates a dll which is loaded by a starter program provided by the framework. A 64-bit starter program is used by default when "Any CPU" is selected. Consequently, the .net 8 application won't run on a 32-bit system.

    There is a way to tell VS2022 to provide a 32-bit starter program for an "Any CPU" .net 8 application by using the NETCoreSdkRuntimeIdentifier MSBuild property. Unlike the behavior under the .Net Framework such an "Any CPU" application will run as a 32-bit process on 64-bit windows.

    I don't see a tangible benefit to using "Any CPU" if you intend to support 32-bit versions of windows since in .Net 8 the starter programs are not platform agnostic.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.