Runtime: Converting a core application to target 32 bit is resulting in error 532462766

Created on 2 Jul 2018  路  10Comments  路  Source: dotnet/runtime

Hi Team ,

I am converting a core application to target 32 bit but while launching application the console window automatically cloases and says "The program '[18400] dotnet.exe' has exited with code -532462766 (0xe0434352)."

Please Let me the solution for this .

area-Meta needs more info question

Most helpful comment

Could you please try changing your .csproj file to the following and see whether it works:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <PlatformTarget>x86</PlatformTarget>
  </PropertyGroup>

  <PropertyGroup>
    <RunCommand>$(MSBuildProgramFiles32)\dotnet\dotnet</RunCommand>
  </PropertyGroup>

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>

</Project>

This creates a project that is hardcoded to x86 without all the moving parts.

If you just need that, you can use it. If you need this to be more abstract, you can add back the conditions as necessary.

All 10 comments

Could you please run the application under debugger and share the callstack where it is crashing?

Is this related to dotnet/runtime#26655?

If so, should that issue be closed now in favor of this one?

Yes we can close that issue , but please do open this as existing issue

I ran the App is debugger mode but its not quiet hitting the breakpoints am i seeing call stack option.
This is what i have done .
1 . Created a core console project.

  1. On the project right click Properties - > Build-> Platform Target Change Any CPU option to x86 .
  2. Complied the app and ran .

The above when ran the console app opens the command prompt and then closes automatically with error 532462766 .

You are hitting https://github.com/dotnet/cli/issues/7532. Could you please apply workaround described in https://github.com/dotnet/cli/issues/7532#issuecomment-330706524 ?

I did the solution explained in dotnet/corefx#7532 , But still i am facing the same error . This is what i have done
Downloaded SDK's
Created a folder in my project called Directory.Build.targets
then pasted below line of code in my .csproj

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup Condition="'$(OS)' == 'Windows_NT' and&#xD;&#xA;                 '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and&#xD;&#xA;                 '$(SelfContained)' != 'true'">
    <RunCommand Condition="'$(PlatformTarget)' == 'x86'">$(MSBuildProgramFiles32)\dotnet\dotnet</RunCommand>
    <RunCommand Condition="'$(PlatformTarget)' == 'x64'">$(ProgramW6432)\dotnet\dotnet</RunCommand>
  </PropertyGroup>

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <Prefer32Bit>true</Prefer32Bit>
  </PropertyGroup>

</Project>

Still this is not working

Could you please try changing your .csproj file to the following and see whether it works:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <PlatformTarget>x86</PlatformTarget>
  </PropertyGroup>

  <PropertyGroup>
    <RunCommand>$(MSBuildProgramFiles32)\dotnet\dotnet</RunCommand>
  </PropertyGroup>

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>

</Project>

This creates a project that is hardcoded to x86 without all the moving parts.

If you just need that, you can use it. If you need this to be more abstract, you can add back the conditions as necessary.

Thanks!! Will try that and let you know

By Far the solution i got is by uninstalling 64 bit version of Core such that the application tends to take only 32 bit version of it .

You can close this issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bencz picture bencz  路  3Comments

jkotas picture jkotas  路  3Comments

yahorsi picture yahorsi  路  3Comments

Timovzl picture Timovzl  路  3Comments

sahithreddyk picture sahithreddyk  路  3Comments